Answers for "how to delete table data in sql in laravel 8"

PHP
0

Laravel Drop All Tables & Migrate

php artisan migrate:fresh

php artisan migrate:fresh --seed
Posted by: Guest on May-04-2021
0

laravel db drop table

foreach(\DB::select('SHOW TABLES') as $table) {
    $all_table_names = get_object_vars($table);
    \Schema::drop($all_table_names[key($all_table_names)]);
}
Posted by: Guest on January-08-2022

Code answers related to "how to delete table data in sql in laravel 8"

Browse Popular Code Answers by Language