Skip to content

Commit

Permalink
Update AuthServiceProvider.php (#41401)
Browse files Browse the repository at this point in the history
  • Loading branch information
imanghafoori1 committed Mar 9, 2022
1 parent f21198c commit 889195b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AuthServiceProvider extends ServiceProvider
/**
* The policy mappings for the application.
*
* @var array
* @var array<class-string, class-string>
*/
protected $policies = [];

Expand All @@ -21,15 +21,15 @@ class AuthServiceProvider extends ServiceProvider
*/
public function registerPolicies()
{
foreach ($this->policies() as $key => $value) {
Gate::policy($key, $value);
foreach ($this->policies() as $model => $policy) {
Gate::policy($model, $policy);
}
}

/**
* Get the policies defined on the provider.
*
* @return array
* @return array<class-string, class-string>
*/
public function policies()
{
Expand Down

0 comments on commit 889195b

Please sign in to comment.