Leaf MVC v5

leaf mvc v5

Elegant PHP for you
and your AI agents ⚡️

Full MVC structure, a console that scaffolds it, and a project map your AI assistant reads so it builds in your patterns, not invented ones.

$ leaf g:controller Posts -m
→ app/controllers/PostsController.php
→ app/models/Post.php $ leaf context
→ Project map ready for your AI (routes, structure, conventions)

The essentials, one function away

Ship features, not boilerplate

app/routes/_auth.php

Auth in one line

Login, signup, sessions and tokens, from one function.

$email = request()->get('email');
$password = request()->get('password');

auth()->login([
  'email' => $email,
  'password' => $password,
]);

app/database/users.yml

Your database is a YAML file

Edit it, run leaf db:migrate, and Leaf diffs the changes in. Seeds included.

columns:
  email: { type: string, unique: true }
  plan: string
seeds:
  count: 10
  data:
    email: '@faker.unique.safeEmail'

app/controllers/SignupController.php

Heavy work leaves the request

Queue the slow part, respond instantly. A worker picks it up in the background.

dispatch(
  SendWelcomeEmail::with($user->id)
);

response()->json([
  'status' => 'shipped',
]);

Need more? leaf install auth db mail billing queue and each module wires itself up.