Answers for "laravel 8 delete"

PHP
2

laravel eloquent remove from db

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

laravel delete

DB::table('users')->where('votes', '>', 100)->delete();
Posted by: Guest on March-11-2021
0

Laravel Delete

Flight::destroy(1);

Flight::destroy(1, 2, 3);

Flight::destroy([1, 2, 3]);

Flight::destroy(collect([1, 2, 3]));
Posted by: Guest on April-27-2021
4

laravel update

$flight = App\Models\Flight::find(1);

$flight->name = 'New Flight Name';

$flight->save();
Posted by: Guest on September-25-2020

Code answers related to "laravel 8 delete"

Browse Popular Code Answers by Language