-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Extension to AuthController fails to "use" custom User entity & model #173
Comments
BTW, I'm using:
|
Why need to extend if you can publish to your app. Just publish controller, entity, model and do what you want. php spark auth:publish |
I prefer extending as well, because you keep upstream updates without having to re-publish and trying to merge changes. Your extension won’t work like you are thinking. The “use” statements don’t “extend” as well, you would actually need to implement them. AuthController currently doesn’t use the “model()” function to make this easy, but it would be a quick PR. |
Thanks to you both. I'm with MGatner on this one. |
@fefo-p I would be in favor of leaving this open as a reminder to switch the module to use the |
Sure, no prob. |
Hey all - I've updated the code to use the |
Hi @lonnieezell, I'm currently diving into the code of myth-auth, and must I say I'm learning quite a lot ^^ I have a silly question following this issue, and the refactor you've made by using the model() helper for the UserModel to facilitate extensions (as suggested by @MGatner):
I've had a need to overwrite the PermissionModel and UserModel instanciated in the services. So I had to change my |
Maybe it's my ignorance, but I'm trying to extend AuthController so it can use my custom versions of User Entity and Model.
I cannot make it work unless I comment out the lines that use
Myth\Auth\Entities\User
andMyth\Auth\Entities\UserModel
from the original AuthController.Anyone know how to achieve this?
Link to Images describing the code down here:
Controller
Routes
Model
The text was updated successfully, but these errors were encountered: