public function delete($id) { try { VelocityUnitModel::find($id)->delete(); $alert['msg'] = 'This velocity unit has been deleted successfully'; $alert['type'] = 'success'; } catch (\Exception $ex) { $alert['msg'] = 'This velocity unit focus has been already used'; $alert['type'] = 'danger'; } return Redirect::route('admin.velocity')->with('alert', $alert); }