Search code examples
phplaravelpackage

Is it possible to change a field automatically through a package when the user's password is modified?


I'm developing a laravel-php package where i need to update a field "password_changed_at" when the user changes his password. I need to make this update happen through a package. Is there ways to do this?


Solution

  • I found a way. Simply by creating an observer in the package that updates the field when the user is updated and calling it in the AppServiceProvider's project.