Answers for "eloquent delete all record laravl;e"

PHP
1

eloquent delete all where

Picture::where('filename', $filename)->delete();
Posted by: Guest on March-02-2021
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

Browse Popular Code Answers by Language