We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
Below is a cheatsheet for some useful php artisan commands in Laravel:
1. php artisan cache:clear
This command clears the application cache, including the cache stored in the bootstrap/cache directory. 2. php artisan config:clear This command clears the configuration cache, which includes the cached configuration files. 3. php artisan route:clear This command clears the route cache, which includes the cached route files. 4. php artisan view:clear This command clears the view cache, which includes the cached view files. 5. php artisan make:controller YourControllerName This command generates a new controller file in the app/Http/Controllers directory. 6. php artisan make:model YourModelName This command generates a new model file in the app directory. 7. php artisan make:migration create_table_name This command generates a new migration file in the database/migrations directory. You should replace table_name with the actual name of the table you want to create. 8. php artisan migrate This command runs all pending migrations and creates the corresponding database tables. 9. php artisan db:seed This command seeds the database with data defined in the DatabaseSeeder.php file or other seeder classes. 10. php artisan make:middleware YourMiddlewareName This command generates a new middleware file in the app/Http/Middleware directory. 11. php artisan key:generate This command generates an application key for the .env file, which is used for encryption and hashing. 12. php artisan serve This command starts a development server and serves the application on http://localhost:8000.