Template PHP Artisan Command
ตัวอย่าง Command ของ php artisan ที่ใช้งานบ่อยๆ ร่วมกับ Laravel Framework
🐴 Key Generate
php artisan key:generate
🦉 Migrate Database
php artisan migrate:fresh
php artisan migrate:refresh --seed
🦣 Make Object
php artisan make:model Example
php artisan make:migration create_example_table
php artisan make:seeder ExampleSeeder
php artisan make:factory ExampleFactory
php artisan make:controller ExampleController
php artisan make:rule ExampleRule
🪸 Check
php artisan --version
php artisan about
php artisan config:show database
🪼 Encrypt Decrypt Environment
php artisan env:encrypt --key=3UVsEgGVK36XN82KKeyLFMhvosbZN1aF
php artisan env:decrypt --key=3UVsEgGVK36XN82KKeyLFMhvosbZN1aF
🦀 Clear Config
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan event:clear
php artisan view:clear
php artisan clear-compiled // Clear Blade
php artisan optimize:clear // Clear All
🐧 Maintenance Mode
php artisan down --render="errors::503"
php artisan down --redirect=/
php artisan up
test
Last updated