updating some logging
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Matt Burchett 2021-04-07 00:06:24 -07:00
parent 094808a98f
commit 29d937b95b

View File

@ -27,6 +27,7 @@ class ShipsController extends Controller
$ship->save(); $ship->save();
}catch(\Exception $e){ }catch(\Exception $e){
session()->flash('error', 'Failed to create record.'); session()->flash('error', 'Failed to create record.');
Log::error($e);
return redirect('/'); return redirect('/');
} }
@ -38,6 +39,7 @@ class ShipsController extends Controller
try { try {
DB::table('ships')->where('id', $request->get('deleteShip'))->delete(); DB::table('ships')->where('id', $request->get('deleteShip'))->delete();
}catch(\Exception $e){ }catch(\Exception $e){
Log::error($e);
session()->flash('error', 'Failed to delete record.'); session()->flash('error', 'Failed to delete record.');
return redirect('/'); return redirect('/');
} }
@ -54,6 +56,7 @@ class ShipsController extends Controller
'shipOwner' => request('shipOwner') 'shipOwner' => request('shipOwner')
)); ));
}catch(\Exception $e){ }catch(\Exception $e){
Log::error($e);
session()->flash('error', 'Failed to update record. Is it possible that the ship ID is not unique?'); session()->flash('error', 'Failed to update record. Is it possible that the ship ID is not unique?');
return redirect('/'); return redirect('/');
} }