src/Database/Concerns/IsRole.php
public static function bootIsRole()
    {
        BaseTenantScope::register(static::class);

        static::creating(function ($role) {
            Models::scope()->applyToModel($role);

            if (is_null($role->title)) {
                $role->title = RoleTitle::from($role)->toString();
            }
        });

        static::deleted(function ($role) {
            $role->abilities()->detach();
        });
    }
public static function bootIsRole()
    {
        BaseTenantScope::register(static::class);

        static::creating(function ($role) {
            Models::scope()->applyToModel($role);

            if (is_null($role->title)) {
                $role->title = RoleTitle::from($role)->toString();
            }
        });

        static::deleted(function ($role) {
            $role->abilities()->detach();
        });
    }
public static function bootIsRole ( ) { BaseTenantScope :: register ( static :: class ) ; static :: creating ( function ( $ role ) { Models :: scope ( ) -> applyToModel ( $ role ) ; if ( is_null ( $ role -> title ) ) { $ role -> title = RoleTitle :: from ( $ role ) -> toString ( ) ; } } ) ; static :: deleted ( function ( $ role ) { $ role -> abilities ( ) -> detach ( ) ; } ) ; }
Boot the is role trait.

@return void
Boot the is role trait .