Artisan là giao diện dòng lệnh (CLI) của Laravel — một công cụ mạnh mẽ cho các tác vụ phát triển phổ biến: sinh code (controller, model, migration), chạy migration, quản lý cache, và nhiều hơn nữa. Nó tăng tốc đáng kể quá trình phát triển và được dùng liên tục.
Sinh code (scaffolding)
php artisan make:controller UserController # sinh một controller
php artisan make:model Post -m
php artisan make:migration create_posts_table
php artisan make:request StoreUserRequest
php artisan make:middleware CheckAge
php artisan make:seeder UserSeeder
php artisan make:model Order -mcr
