Beartropy Permissions
Configuration Options
After publishing the configuration, you'll find the file at
config/beartropy-permissions.php.
Here are all the available options.Full Configuration
Here is the default configuration file:
1<?php 2 3return [ 4 /* 5 |-------------------------------------------------------------------------- 6 | Route Configuration 7 |-------------------------------------------------------------------------- 8 */ 9 'route_prefix' => 'permissions',10 'route_middleware' => ['web', 'auth'],11 12 /*13 |--------------------------------------------------------------------------14 | Layout15 |--------------------------------------------------------------------------16 | The layout to use for the permissions UI. Set to null to use the17 | component without a layout wrapper.18 */19 'layout' => null,20 21 /*22 |--------------------------------------------------------------------------23 | User Model24 |--------------------------------------------------------------------------25 | The fully qualified class name of your User model.26 */27 'user_model' => App\Models\User::class,28 29 /*30 |--------------------------------------------------------------------------31 | Guards32 |--------------------------------------------------------------------------33 | The guards available for roles and permissions.34 */35 'guards' => ['web'],36 'default_guard' => 'web',37 38 /*39 |--------------------------------------------------------------------------40 | User Display41 |--------------------------------------------------------------------------42 | Configure how users are displayed in the UI.43 */44 'user_display_field' => 'name',45 'user_search_fields' => ['name', 'email'],46 47 /*48 |--------------------------------------------------------------------------49 | Permission Grouping50 |--------------------------------------------------------------------------51 | Permissions can be grouped by a separator in their name.52 | E.g., "users.create", "users.edit" will be grouped under "users".53 */54 'group_permissions' => true,55 'permission_group_separator' => '.',56];
Configuration Options
| Option | Default | Description |
|---|---|---|
route_prefix |
'permissions' |
URL prefix for the permissions UI |
route_middleware |
['web', 'auth'] |
Middleware applied to routes |
layout |
null |
Blade layout to wrap the UI |
user_model |
App\Models\User |
Your application's User model |
guards |
['web'] |
Available authentication guards |
default_guard |
'web' |
Default guard for new roles/permissions |
user_display_field |
'name' |
Field to display in user lists |
user_search_fields |
['name', 'email'] |
Fields searchable in user table |
group_permissions |
true |
Enable automatic grouping |
permission_group_separator |
'.' |
Separator for permission grouping |
Current version:
0.1.2