php artisan make:migration drop_name_table
Update Table
migrate:fresh Drop all tables and re-run all migrations
migrate:install Create the migration repository
migrate:refresh Reset and re-run all migrations
migrate:reset Rollback all database migrations
migrate:rollback Rollback the last database migration
migrate:status Show the status of each migration
for specific table
php artisan migrate:refresh --path=/database/migrations/table_name.php
Schema::drop('users');
Schema::dropIfExists('users');
//Get all the table names
$all_table_names = Schema::getConnection()->getDoctrineSchemaManager()->listTableNames();
foreach ($all_table_names as $name) {
//if you don't want to truncate migrations in Database
if ($name == 'migrations') {
continue;
}
DB::table($name)->truncate();
}
foreach(DB::select('SHOW TABLES') as $table) {
$all_table_names = get_object_vars($table);
Schema::drop($all_table_names[key($all_table_names)]);
}