Customize User model
Moonguard comes with its own user model (it has a default structure with some modifications), but you will most likely want to use your project's user model. If that's the case, the next section will help you make the necessary changes to the Moonguard configuration.
Custom User Model
Follow the next steps to adapt your own User
model to use MoonGuard features:
Create a
User
class must extends fromIlluminate\Database\Eloquent\Model
and implements theTaecontrol\MoonGuard\Contracts\MoonGuardUser
contract.The
User
class must declareuse Notifiable
.The
User
class have to implement all the properties and methods required, you can guide yourself with the originalUser.php
model from Moonguard.Replace the new
User
model class in the configuration file.