Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tharindarodrigo authored Jan 24, 2024
1 parent 32b9440 commit ecb11d0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,9 @@ Example: If you use `api` guard, you should add the following to the `guards` ar
'teams' => true
```

- Make sure the `team_model` on the `config/filament-spatie-roles-permissions` is correctly set.

- Make sure the `team_model` on the `config/permission` is correctly set.
- Create a Role model which extends `Spatie\Permission\Models\Role`
- Create a Permission model which extends `Spatie\Permission\Models\Permission`
- Replace the models in the `config/permission.php` with the newly created models
- Replace the model in the `config/permission.php` with the newly created models
- Add the `team` relationship in both models

```php
Expand All @@ -192,7 +190,6 @@ public function team(): BelongsTo
```
- Add the following to the `AdminPanelProvider` to support tenancy

Follow the instructions on [Filament Multi-tenancy](https://filamentphp.com/docs/3.x/panels/tenancy)

```php
use Althinect\FilamentSpatieRolesPermissions\Middleware\SyncSpatiePermissionsWithFilamentTenants;
Expand All @@ -204,6 +201,8 @@ $panel
], isPersistent: true)
```

Follow the instructions on [Filament Multi-tenancy](https://filamentphp.com/docs/3.x/panels/tenancy)

### Configurations

In the **filament-spatie-roles-permissions.php** config file, you can customize the permission generation
Expand Down

0 comments on commit ecb11d0

Please sign in to comment.