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


PHP Permission::whereName方法代碼示例

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


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

示例1: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Role::whereName('administrator')->delete();
     // Delete Welcome Permission
     Permission::whereName('admin.welcome.index')->delete();
     // Delete User Permissions
     Permission::whereName('admin.users.index')->delete();
     Permission::whereName('admin.users.create')->delete();
     Permission::whereName('admin.users.edit')->delete();
     Permission::whereName('admin.users.show')->delete();
     Permission::whereName('admin.users.destroy')->delete();
     // Delete Role Permissions
     Permission::whereName('admin.roles.index')->delete();
     Permission::whereName('admin.roles.create')->delete();
     Permission::whereName('admin.roles.edit')->delete();
     Permission::whereName('admin.roles.show')->delete();
     Permission::whereName('admin.roles.destroy')->delete();
     // Delete Permission Permissions
     Permission::whereName('admin.permissions.index')->delete();
     Permission::whereName('admin.permissions.create')->delete();
     Permission::whereName('admin.permissions.edit')->delete();
     Permission::whereName('admin.permissions.show')->delete();
     Permission::whereName('admin.permissions.destroy')->delete();
     // Delete User Permission Permissions
     Permission::whereName('admin.users.permissions.store')->delete();
     Permission::whereName('admin.users.permissions.destroy')->delete();
     // Delete Role Permission Permissions
     Permission::whereName('admin.roles.permissions.store')->delete();
     Permission::whereName('admin.roles.permissions.destroy')->delete();
     // Delete Role User Permissions
     Permission::whereName('admin.roles.users.destroy')->delete();
     Permission::whereName('admin.roles.users.destroy')->delete();
 }
開發者ID:stevebauman,項目名稱:administration,代碼行數:38,代碼來源:2014_10_12_300000_seed_roles_and_permissions.php


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