Users and Roles

Using Custom Models

If you want to override the default Enso User model (role, permissions), you will need to:

  1. Bind User model to Enso's user contract in the AppServiceProvider register method like so:

    app()->bind(UserContract::class, UserConcrete::class);
    
  2. Update the base class of app\User.php to be Yadda\Enso\Users\Models\User - removing hidden, fillable and notifiable as these are preset in the parent vendor/yadda/enso-core/src/Users/Models/User.php

    namespace App;
    
    use Yadda\Enso\Users\Models\User as EnsoUser;
    
    class User extends EnsoUser
    {
       //
    }