/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function getDelete($id) { if (Session::get('user_level') < Config::get('cms.deleteContacts')) { return Redirect::to(_l(URL::action('AdminHomeController@getIndex')))->with('message', Lang::get('admin.notPermitted'))->with('notif', 'warning'); } try { $mark = Mark::findOrFail($id); $mark->delete(); return Redirect::to(_l(URL::action('MarkController@getIndex')))->with('message', Lang::get('admin.markDeleted'))->with('notif', 'success'); } catch (Exception $e) { return Redirect::to(_l(URL::action('MarkController@getIndex')))->with('message', Lang::get('admin.noSuchMark'))->with('notif', 'danger'); } }