Answers for "laravel eloquent delete all rows"

PHP
2

delete all rows from table laravel

MyModel::truncate();
Posted by: Guest on June-19-2020
0

delete all records from table using button laravel Eloquent

// Uncomment the below to wipe the table clean before populating

DB::table('table_name')->truncate();

//or

DB::table('table_name')->delete();

MyModel::truncate();
Posted by: Guest on October-30-2021

Code answers related to "laravel eloquent delete all rows"

Browse Popular Code Answers by Language