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