Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Use the policies() method instead of the property policies #30189

Merged
merged 1 commit into from
Oct 7, 2019
Merged

[6.x] Use the policies() method instead of the property policies #30189

merged 1 commit into from
Oct 7, 2019

Conversation

arcanedev-maroc
Copy link
Contributor

@arcanedev-maroc arcanedev-maroc commented Oct 4, 2019

This change allows to use the unused policies() method and also to do something dynamic like this:

// App\Providers\AuthServiceProvider

   /**
     * Get the policies defined on the provider.
     *
     * @return array
     */
    public function policies()
    {
        return config('policies', []);
    }

Related: #26810

This change allows to use the *unused* `policies()` method and also to do something like this:

```php
   /**
     * Get the policies defined on the provider.
     *
     * @return array
     */
    public function policies()
    {
        return config('policies', []);
    }
```
@taylorotwell taylorotwell merged commit 6169acc into laravel:6.x Oct 7, 2019
@arcanedev-maroc arcanedev-maroc deleted the patch-4 branch October 7, 2019 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants