Answers for "how to delete all records from a table laravel with eloquent"

PHP
2

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();
Posted by: Guest on September-02-2021
1

eloquent delete all where

Picture::where('filename', $filename)->delete();
Posted by: Guest on March-02-2021

Code answers related to "how to delete all records from a table laravel with eloquent"

Browse Popular Code Answers by Language