delete all rows from table laravel

53

delete all rows from table laravel -

MyModel::truncate();

delete all rows in table laravel -

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

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

//or

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

truncate table laravel eloquent -

Visitor::query()->truncate();

Comments

Submit
0 Comments