public function roles() : BelongsToMany
    {
        $pivotTable = config('lia.database.role_users_table');

        $relatedModel = config('lia.database.roles_model');

        return $this->belongsToMany($relatedModel, $pivotTable, 'user_id', 'role_id');
    }
public function roles() : BelongsToMany
    {
        $pivotTable = config('lia.database.role_users_table');

        $relatedModel = config('lia.database.roles_model');

        return $this->belongsToMany($relatedModel, $pivotTable, 'user_id', 'role_id');
    }
public function roles ( ) : BelongsToMany { $ pivotTable = config ( 'lia.database.role_users_table' ) ; $ relatedModel = config ( 'lia.database.roles_model' ) ; return $ this -> belongsToMany ( $ relatedModel , $ pivotTable , 'user_id' , 'role_id' ) ; }
A user has and belongs to many roles.

@return BelongsToMany
A user has and belongs to many roles .