-
-
Notifications
You must be signed in to change notification settings - Fork 947
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
Policies/Exceptions within modules #16
Comments
Hello, You can already define you policies inside a module. You could also register the policies in the And yes exceptions are just as any other class, meaning they get autoloaded by composer. |
Thanks again for the advice |
Hi, i reopened the issue for going further with an aspect. |
I solved. |
The same problem, can't solve |
I have the same problem. My MODULENAMEServiceProvider has
In TemplateAuthServiceProvider I have
My controller which is inside the module has
The policy contains
what could be the reason for the system not to trigger the policy function? |
I have the same problem |
Hi There,
Is is already possible, or do you have plans to allow for policies and exceptions to be within the modules created by laravel-modules?
For policies, it looks like it is possible with the
registerPolicies
function within theAuthServiceProvider
. So would each module require an instance of the AuthServiceProvider to register their policies? Or would it be easier to register each module's policies within the global AuthServiceProvider?I assume that exception classes will be auto loaded by default, so it is just a case of creating a folder within each module and place the exceptions in there?
Thanks in advance for any advice offered.
The text was updated successfully, but these errors were encountered: