Check if laravel model got saved or query got executed
Check if model got saved save() will return a boolean, saved or not saved. So you can either do: $saved = $myModel->save(); if(!$saved){ App::abort(500, ‘Error’); } Or directly save in the if: if(!$myModel->save()){ App::abort(500, ‘Error’); } Note that it doesn’t make sense to call save() two times in a row like in your example. And … Read more