laravel update if exists or create

Solutions on MaxInterview for laravel update if exists or create by the best coders in the world

showing results for - "laravel update if exists or create"
Michele
06 Feb 2018
1$flight = App\Flight::updateOrCreate(
2    ['departure' => 'Oakland', 'destination' => 'San Diego'],
3    ['price' => 99]
4);