本文整理匯總了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();
}