/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { try { Permission::destroy($id); } catch (\Exception $e) { return \Redirect::back()->withErrors('You cannot delete this item, it may has information attached to it. Please remove that information first'); } return \Redirect::route('permissions.index')->with('flash_message', 'Role has been removed.'); }