Skip to content

Commit

Permalink
[10.x] Register policies automatically to the gate (#46132)
Browse files Browse the repository at this point in the history
* [10.x] Register policies automatically to the gate

* formatting

* formatting

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
ahmett and taylorotwell authored Feb 16, 2023
1 parent a47e7a2 commit 66ce77d
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ class AuthServiceProvider extends ServiceProvider
*/
protected $policies = [];

/**
* Register the application's policies.
*
* @return void
*/
public function register()
{
$this->booting(function () {
$this->registerPolicies();
});
}

/**
* Register the application's policies.
*
Expand Down

0 comments on commit 66ce77d

Please sign in to comment.