Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhanSalleh authored Feb 10, 2025
1 parent a521930 commit 31b1fc9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,17 @@ If your policies are not in the default `Policies` directory in the `app_path()`
```

#### Policy Discovery

Got a ton of policies inside subdirectories? Have to manually register them! right?

Well, you can or you could instruct Laravel to automatically detect and register policies—even in subdirectories for you.
Just add this to the boot() method:

Just add this to the `boot()` method:

📌 Laravel 10 → `AuthServiceProvider`

📌 Laravel 11+ → `xxServiceProvider`.

```
public function boot(): void
{
Expand All @@ -440,8 +448,6 @@ public function boot(): void
});
}
```
📌 Laravel 10 → Add this to AuthServiceProvider.
📌 Laravel 11+ → Add this to any xxServiceProvider.

#### Third-Party Plugins Policies

Expand Down

0 comments on commit 31b1fc9

Please sign in to comment.