src/Models/UserObserver.php
public function created($user)
    {
        if (! $baseName = $user->baseRole) {
            return;
        }
 
        // Attach base role
        if (method_exists($user, 'attachRole')) {
            $user->attachRole($baseName);
        }
    }
public function created($user)
    {
        if (! $baseName = $user->baseRole) {
            return;
        }
 
        // Attach base role
        if (method_exists($user, 'attachRole')) {
            $user->attachRole($baseName);
        }
    }
public function created ( $ user ) { if ( ! $ baseName = $ user -> baseRole ) { return ; } // Attach base role if ( method_exists ( $ user , 'attachRole' ) ) { $ user -> attachRole ( $ baseName ) ; } }
Listen to the User created event.

@param object $user
@return void
Listen to the User created event .