Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhanSalleh authored Nov 21, 2024
1 parent df56fab commit 456fac1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,19 @@ composer require bezhansalleh/filament-shield
```

### 2. Configure Auth Provider
Add the `HasRoles` trait to your User model:
#### 2.1. Publish the config and setup your auth provider model.
```bash
php artisan vendor:publish --tag="filament-shield-config"
```
```php
//config/filament-shield.php
...
'auth_provider_model' => [
'fqcn' => 'App\\Models\\User',
],
...
```
#### 2.2 Add the `HasRoles` trait to your auth provider model:
```php
use Spatie\Permission\Traits\HasRoles;

Expand Down

0 comments on commit 456fac1

Please sign in to comment.