You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was working on my AuthServiceProvider refactoring a large array assignment to the $policies property at the top of the file. I came across something that looked broken inside the framework's AuthServiceProvider, but I wanted to check with the community to see if I am overlooking something.
Long story short, overwriting the framework's AuthServiceProvider's public function policies() inside my own AuthServiceProvider never gets called and so has no purpose as far as I can see. I would love to be able to overwrite the policies() function and return an array based on some logic.
The framework's AuthServiceProvider's public function registerPolicies() accesses the protected $policies property directly instead of requesting the property through the policies() method.
Seems like it would make sense to update the following line 24 to $this->policies() as opposed to $this->policies? Hope I'm making sense.
I was working on my AuthServiceProvider refactoring a large array assignment to the
$policies
property at the top of the file. I came across something that looked broken inside the framework's AuthServiceProvider, but I wanted to check with the community to see if I am overlooking something.Long story short, overwriting the framework's AuthServiceProvider's
public function policies()
inside my own AuthServiceProvider never gets called and so has no purpose as far as I can see. I would love to be able to overwrite the policies() function and return an array based on some logic.The framework's AuthServiceProvider's
public function registerPolicies()
accesses theprotected $policies
property directly instead of requesting the property through the policies() method.Seems like it would make sense to update the following line 24 to
$this->policies()
as opposed to$this->policies
? Hope I'm making sense.framework/src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php
Lines 17 to 27 in f7dfb60
framework/src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php
Lines 37 to 45 in f7dfb60
I just ended up assigning the
$policies
property inside myboot
method to get around this for now.The text was updated successfully, but these errors were encountered: