laravel eloquent create function code example
Example 1: find or fail laravel
$model = App\Models\Flight::findOrFail(1);
$model = App\Models\Flight::where('legs', '>', 100)->firstOrFail();
Example 2: laravel update first
Model::where(['x' => 1, 'y' => 2])->first()->update([...]);