This commit is contained in:
parent
094808a98f
commit
29d937b95b
@ -27,6 +27,7 @@ class ShipsController extends Controller
|
||||
$ship->save();
|
||||
}catch(\Exception $e){
|
||||
session()->flash('error', 'Failed to create record.');
|
||||
Log::error($e);
|
||||
return redirect('/');
|
||||
|
||||
}
|
||||
@ -38,6 +39,7 @@ class ShipsController extends Controller
|
||||
try {
|
||||
DB::table('ships')->where('id', $request->get('deleteShip'))->delete();
|
||||
}catch(\Exception $e){
|
||||
Log::error($e);
|
||||
session()->flash('error', 'Failed to delete record.');
|
||||
return redirect('/');
|
||||
}
|
||||
@ -54,6 +56,7 @@ class ShipsController extends Controller
|
||||
'shipOwner' => request('shipOwner')
|
||||
));
|
||||
}catch(\Exception $e){
|
||||
Log::error($e);
|
||||
session()->flash('error', 'Failed to update record. Is it possible that the ship ID is not unique?');
|
||||
return redirect('/');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user