drop table in migration laravel code example

Example 1: php artisan drop table

php artisan make:migration drop_name_table

Example 2: laravel drop table migration

Schema::drop('users');

Schema::dropIfExists('users');

Example 3: Laravel Drop All Tables & Migrate

php artisan migrate:fresh

php artisan migrate:fresh --seed

Example 4: delete a migration laravel

// delete a migration safely from laravel 
delete migration from database/migrations/ directory
and also delete entry from migrations table

Tags:

Php Example