Answers for "larael remove record from database"

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
2

laravel eloquent remove from db

$res=User::where('id',$id)->delete();
Posted by: Guest on November-05-2020

Code answers related to "larael remove record from database"

Browse Popular Code Answers by Language