Password reset for different user model
I have setup a different user model for a separate panel called customer. It all works correct, but I cannot get the passwordReset method to work.
This is the new Customer model.
9 Replies
When I try to send the password request it returns the error that the email is not found. It still looks in the User table for some reason. Do I need to specifiy somewhere in the->passwordReset which model it needs to look for?
I have followed this tutorial:
https://medium.com/@josephajibodu/change-laravel-authentication-model-for-filamentphp-3-b69fa1560cb2
Medium
Change Laravel Authentication Model for FilamentPHP 3
I was developing an e-commerce platform where I wanted to separate the customers from the website administrators for various reasons.
Also setup the ->authGuard('customer'); inside the PackagePanelProvider class
Probably you need to override in the model the sendPasswordResetNotification method from the CanResetPassword contract
By default laravel does this
I think you have to create your own ResetPasswordNotificaton version
Allright, I will google some information on this... The laravel docs say I need to implement the CanResetPasswordContract on the model
It might be the case yeah I just remembered doing something like that for a non-filament project a while ago but the solution should be related to that contract
Jeah, the docs make it look easy π But not really sure how it translates to filament