Skip to content
Guest
← All References
Laravel Laravel 11+ / PHP 8.2+

Laravel Quick Reference

Essential Laravel Artisan commands, routing, Blade directives, Eloquent relationships, validation, Sanctum auth, and production optimization.

php artisan make:model Post -mcr; Post::with('author')->paginate(15);

Core Laravel & Artisan Cheat Sheet

ConceptSyntax / Command
Model + Migration + Resource Controllerphp artisan make:model Post -mcr
Run migrationsphp artisan migrate
Eager load (avoid N+1)Post::with('author')->latest()->paginate(15)
Blade escaped output{{ $user->name }}
CSRF form directive@csrf inside every POST/PUT/DELETE form
Form Request validationphp artisan make:request StorePostRequest
API Resourcephp artisan make:resource PostResource
Production cache warmphp artisan optimize

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind