Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Latest commit

 

History

History

leaf

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Leaf PHP

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

$app = new Leaf\App;

$app->set404();
$app->db()->autoConnect();

$app->get('/resources', function($id) use($app) {
  $app->response()->json([
    "resource" => $app->db()->select("resources")->all()
  ]);
});

$app->run();

Leaf v3.0 beta (👸🏼 Queen of the night) has just been released. Read the docs

✨ Quickly Create PHP Projects

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

💻 Install with composer

You can quickly get leaf installed in your application using composer. Simply run:

composer require leafs/leaf

You can then import leaf into your project and start building all your amazing projects. You can view your project using:

php -S localhost:8080

🎮 New project with Leaf CLI

You may also create a Leaf project using Leaf CLI

leaf create <project-name>

🐾 Next Steps

From here, you'll have Leaf installed in your project. You can jummp to one of these pages.


Built with ❤ by Mychi Darko