From 31b1fc9a4b4d59c913435bfed887cadcb9527bfb Mon Sep 17 00:00:00 2001 From: Bezhan Salleh Date: Mon, 10 Feb 2025 17:49:45 +0100 Subject: [PATCH] Update README.md --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 81af820..1b7c7d9 100644 --- a/README.md +++ b/README.md @@ -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 { @@ -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