An option is to do it using a model event in your User model.
class User extends Authenticatable {
protected static function boot()
{
parent::boot();
static::created(function($user) {
$user->assignRole(config('auth.defaults.role'));
});
}
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community