/** * Remove the specified resource from storage. * * @param int $id * * @return Response */ public function destroy($id) { Role::destroy($id); Session::flash('flash_message', 'Role deleted!'); return redirect('admin/roles'); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { if (!$this->user->userCan('role-delete')) { \App::abort(403, 'Access denied'); } \App\Role::destroy($id); return redirect('/admin/role'); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { Role::destroy($id); flash()->success('Success!', 'Role has been deleted!'); return redirect('roles'); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy(Request $request, $id) { Role::destroy($id); if ($request->isXmlHttpRequest()) { return 'ok'; } else { $this->alert('删除成功'); return redirect(route('role.index')); } }
/** * Remove the specified resource from storage. * * @param int $id * * @return Response */ public function destroy($id) { if (Auth::user()->role_id != 1) { return redirect('home'); Session::flash('flash_message', 'Nie masz do tego uprawnień'); } else { try { Role::destroy($id); Session::flash('flash_message', 'Skasowano role!'); return redirect('role'); } catch (\Exception $e) { Session::flash('flash_message', 'Rola jest używana przez jakiegoś użytkownika nie można jej skasować'); return redirect('role'); } } }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Role::destroy($id); return redirect()->route('role.index'); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { Role::destroy($id); return Redirect::route('template.role.index'); }
public function destroy($id) { Role::destroy($id); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { // Role::destroy($id); return redirect('system/roles'); }