All Projects → leafsphp → Leaf

leafsphp / Leaf

🍁 The easiest way to create clean, simple but powerful web apps and APIs quickly

Projects that are alternatives of or similar to Leaf

Miniphp
A small, simple PHP MVC framework skeleton that encapsulates a lot of features surrounded with powerful security layers.
Stars: ✭ 144 (-41.94%)
Mutual labels:  framework, php-framework, mvc
Lad
👦 Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
Stars: ✭ 2,112 (+751.61%)
Mutual labels:  api, framework, mvc
Autoserver
Create a full-featured REST/GraphQL API from a configuration file
Stars: ✭ 188 (-24.19%)
Mutual labels:  api, framework
Elefant
Elefant, the refreshingly simple PHP CMS and web framework.
Stars: ✭ 188 (-24.19%)
Mutual labels:  framework, mvc
Messenger4j
A Java library for building Chatbots on the Facebook Messenger Platform - easy and fast.
Stars: ✭ 199 (-19.76%)
Mutual labels:  api, framework
Mono
Minimalist Framework on top of Express.js
Stars: ✭ 163 (-34.27%)
Mutual labels:  api, framework
Woowahanjs
웹 어플리케이션 개발을 위한 JS프레임워크
Stars: ✭ 171 (-31.05%)
Mutual labels:  framework, mvc
Component
🔥🔥🔥A powerful componentized framework.一个强大、100% 兼容、支持 AndroidX、支持 Kotlin并且灵活的组件化框架
Stars: ✭ 2,434 (+881.45%)
Mutual labels:  api, framework
Vendure
A headless GraphQL ecommerce framework for the modern web
Stars: ✭ 2,961 (+1093.95%)
Mutual labels:  api, framework
Apiato
PHP Framework for building scalable API's on top of Laravel.
Stars: ✭ 2,564 (+933.87%)
Mutual labels:  api, php-framework
Magic
Create your .Net Core/Angular/Database CRUD Web apps by simply clicking a button
Stars: ✭ 214 (-13.71%)
Mutual labels:  api, framework
Opentest
Open source test automation tool for web applications, mobile apps and APIs
Stars: ✭ 246 (-0.81%)
Mutual labels:  api, framework
Mandarinets
Mandarine.TS is a typescript, decorator-driven framework that allows you to create server-side applications. Mandarine.TS provides a range of built-in solutions such as Dependency Injection, Components, ORM and more. Under its umbrella, Mandarine.TS has 4 modules: Core, Data, Security and MVC, these modules will offer you the requirements to build a Mandarine-powered application.
Stars: ✭ 161 (-35.08%)
Mutual labels:  framework, mvc
Proteus
Lean, mean, and incredibly fast JVM framework for web and microservice development.
Stars: ✭ 178 (-28.23%)
Mutual labels:  api, mvc
Fastapi Crudrouter
A dynamic FastAPI router that automatically creates CRUD routes for your models
Stars: ✭ 159 (-35.89%)
Mutual labels:  api, framework
Actionhero
Actionhero is a realtime multi-transport nodejs API Server with integrated cluster capabilities and delayed tasks
Stars: ✭ 2,280 (+819.35%)
Mutual labels:  api, framework
Windwalker Framework
PHP Rapid Application Development Framework
Stars: ✭ 230 (-7.26%)
Mutual labels:  framework, php-framework
Pinatra
A PHP copy of Sinatra: a DSL for quickly creating web applications in PHP with minimal effort.
Stars: ✭ 151 (-39.11%)
Mutual labels:  framework, php-framework
Ihp
🔥 The fastest way to build type safe web apps. IHP is a new batteries-included web framework optimized for longterm productivity and programmer happiness
Stars: ✭ 2,746 (+1007.26%)
Mutual labels:  framework, mvc
Yii2
Yii 2: The Fast, Secure and Professional PHP Framework
Stars: ✭ 13,852 (+5485.48%)
Mutual labels:  framework, php-framework



Leaf PHP Framework



Leaf PHP

Latest Stable Version Total Downloads License

Leaf is a PHP framework that helps you create clean, simple but powerful web apps and APIs quickly and easily. Leaf introduces a cleaner and much simpler structure to the PHP language while maintaining it's flexibility. With a simple structure and a shallow learning curve, it's an excellent way to rapidly build powerful and high performant web apps and APIs.

Installation

You can easily install Leaf using Composer.

composer require leafs/leaf

This will install Leaf in your project directory.

Basic Usage

This is a simple demonstration of Leaf's simplicity. After installing Leaf, create an index.php file.

<?php
require __DIR__ . 'vendor/autoload.php';

$app = new Leaf\App;
$auth = new Leaf\Auth;

$auth->connect("host", "user", "pass", "db name");

// Base example
$app->get('/', function() use($app) {
   $app->response()->respond("My first Leaf app");
});

// Full login example
$app->post('/auth/login', function() use($app, $auth) {
    $credentials = $app->request()->get(["username", "password"]);

    $user = $auth->login("users", $credentials, [
        "username" => ["username", "max:15"],
        "password" => ["text", "NoSpaces", "min:8"],
    ]);

    if (!$user) {
        $app->response()->throwErr($auth->errors());
    }

    $app->response()->json($user);
});

$app->run();

You may quickly test this using the built-in PHP server:

php -S localhost:8000

You can view the full documentation here

Working With MVC

Leaf has recently added a new package to it's collection: LeafMVC. It's an MVC framework built with this package at it's core that let's you create clean, simple but powerful web applications and APIs quickly and easily.

Checkout LeafMVC here

Working with API

Leaf also added a simple framework constructed in an MVCish way, but without the View layer purposely for creating APIs and Libraries. Leaf terms this construct as MRRC(Model Request Response Controller😅😅😅). This let's you seperate API logic, data and "views"(request and response) just like how it's done in MVC.

Checkout the LeafAPI package here

Skeleton

Skeleton is the latest package included in the Leaf family. Skeleton is a customizable and simple to use boilerplate powered by Leaf. Skeleton gives you the power of other setups like Leaf MVC without the restrictions of those full blown frameworks. Use and contribute to Skeleton

Of course, with this core package, you can build your app in any way that you wish to as Leaf contains all the required functionality to do so

View Leaf's docs here

Built with ❤ by Mychi Darko

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].