Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshjha committed Oct 13, 2020
1 parent 1d682a3 commit 4cf48cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions database/migrations/create_permission_setup_table.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class CreatePermissionSetupTable extends Migration
$table->foreign('ability_id')
->references('id')
->on('abilities')
->onUpdate('cascade')
->onDelete('cascade');
});

Expand All @@ -63,11 +64,13 @@ class CreatePermissionSetupTable extends Migration
$table->foreign($user_id)
->references('id')
->on('users')
->onUpdate('cascade')
->onDelete('cascade');

$table->foreign('role_id')
->references('id')
->on('roles')
->onUpdate('cascade')
->onDelete('cascade');
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/RecordAbility.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function handle()

$middlewares = $route->gatherMiddleware();

$group = (Str::of($route->getPrefix())->ltrim('/') == config('permission.adminPrefix'))
$group = (Str::of($route->getPrefix())->ltrim('/') == config('permission.adminRoutePrefix'))
? Permission::GROUP_SYSTEM
: Permission::GROUP_ACCOUNT;

Expand Down

0 comments on commit 4cf48cb

Please sign in to comment.