We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a8dfd89 + 574dd83 commit 931edd5Copy full SHA for 931edd5
src/Commands/PermissionsGenerate.php
@@ -57,7 +57,10 @@ public function handle()
57
}
58
59
$name = $route->getName();
60
- $permission = Permission::firstOrCreate(['action'=>$action, 'name'=>$name]);
+ $permission = Permission::updateOrCreate(
61
+ ['name'=>$name],
62
+ ['action'=>$action]
63
+ );
64
65
if (key_exists('role', $route->action)) {
66
$roles = $route->action['role'];
0 commit comments