當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Permission::destroy方法代碼示例

本文整理匯總了PHP中app\Permission::destroy方法的典型用法代碼示例。如果您正苦於以下問題:PHP Permission::destroy方法的具體用法?PHP Permission::destroy怎麽用?PHP Permission::destroy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Permission的用法示例。


在下文中一共展示了Permission::destroy方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 /**
  * delete data
  * @return json
  */
 public function delete()
 {
     $id = (int) $_POST['id'];
     $rs = Permission::destroy($id);
     if ($rs) {
         return response()->json(['status' => 200, 'message' => 'Deleted Successfully~~']);
     } else {
         return response()->json(['status' => 400, 'message' => 'Delete Failure~~']);
     }
 }
開發者ID:Jokeramc,項目名稱:amc,代碼行數:14,代碼來源:PermissionController.php

示例2: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Permission::destroy($id);
     flash()->success('Success!', 'Permission has been deleted!');
     return redirect('permissions');
 }
開發者ID:amolkattel,項目名稱:Asset-Mgnt-Project,代碼行數:12,代碼來源:PermissionsController.php

示例3: destroy

 public function destroy(Request $request, $id)
 {
     empty($id) && !empty($request->input('id')) && ($id = $request->input('id'));
     $id = (array) $id;
     foreach ($id as $v) {
         $permission = Permission::destroy($v);
     }
     return $this->success('', count($id) > 5, compact('id'));
 }
開發者ID:unionbt,項目名稱:hanpaimall,代碼行數:9,代碼來源:PermissionController.php

示例4: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     Permission::destroy($id);
     return redirect('system/permissions');
 }
開發者ID:seahouse,項目名稱:hxerp,代碼行數:12,代碼來源:PermissionsController.php

示例5: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if (!$this->user->userCan('permission-delete')) {
         \App::abort(403, 'Access denied');
     }
     \App\Permission::destroy($id);
     return redirect('/admin/permission');
 }
開發者ID:serovvitaly,項目名稱:kotik,代碼行數:14,代碼來源:PermissionController.php

示例6: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\RedirectResponse
  */
 public function destroy($id)
 {
     Permission::destroy($id);
     \Session::flash('flash_message', 'Permission deleted!');
     return \Redirect::route('admin.permissions.index', [])->withMessage(trans('acl::permission.permissions-controller-successfully_deleted'));
 }
開發者ID:meccado,項目名稱:acl-admin-control-panel,代碼行數:12,代碼來源:PermissionController.php

示例7: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  *
  * @return void
  */
 public function destroy($id)
 {
     Permission::destroy($id);
     Session::flash('flash_message', 'Permission deleted!');
     return redirect('admin/permissions');
 }
開發者ID:appzcoder,項目名稱:laravel-admin,代碼行數:13,代碼來源:PermissionsController.php


注:本文中的app\Permission::destroy方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。