Answers for "laravel mass update"

PHP
2

laravel force delete

Product::find($id)->forceDelete();
Posted by: Guest on December-27-2020
1

Laravel eloquent mass update

Flight::where('active', 1)
      ->where('destination', 'San Diego')
      ->update(['delayed' => 1]);
Posted by: Guest on July-24-2021
4

laravel update

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

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

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

Browse Popular Code Answers by Language