Home
PHP
Tech Tube
MySQL
Linux
CSS&HTML
JavaScript

Artisan commands

Some useful artisan commands... Fresh migration of a single table: NOTE: be very careful with this command because it may affect other tables.
php artisan migrate:refresh --path=/database/migrations/your_migration.php
Revert the last migration:
php artisan migrate:rollback --step=1
Revert specific migration:
php artisan migrate:rollback --path=/database/migrations/your-specific-migration.php
Run specific seeder:
php artisan db:seed --class=UserTableSeeder
Get rid of all the cache:
php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clear
php artisan optimize