| [ Web Proxy ] |
| Viewing: https://leafphp.dev/docs/ | [Back] [Original] |
Leaf 5 is here/A product-first PHP framework for the AI era.
Explore what's newWhat's newGet started
Leaf gives you the clean starting point first: routing, structure, helpers, and a project shape that stays readable for you, your team, and your AI tools.
Open http://localhost:5500 and you have a running app. No setup maze, no ceremony.
Why it matters
Start with the parts you need. Add auth, database, queues, mail, and more when the app asks for them.
Routes, modules, and app conventions stay obvious, so assistants can generate code that fits your project.
No hidden runtime or lock-in. Deploy anywhere PHP runs.
Leaf is designed to stay light while giving you production-ready pieces as soon as you need them.
Here is the smallest possible Leaf app:
<?php
require __DIR__ . '/vendor/autoload.php';
app()->get('/', function () {
response()->json(['message' => 'Hello World!']);
});
app()->run();And when you need more, install only what the project needs:
Leaf CLI
leaf install <package-name>Composer
composer require leafs/<package-name>Tell your AI assistant to "build out authentication" and it can follow Leaf's structure instead of inventing one.
Technical RequirementsBefore you start with Leaf, verify that your system has the following installed:
If you don't have PHP and Composer installed, here are some easy options to get you set up:
Updated at:
| Web Proxy Viewer | New URL | Original Page |