Why selectColumn is not working

Hi i am using the plugin Shield, and i want in mine resource User to be able to change role. I made custom Role model which extends Spatie model, and i added a relationship to the user. Mine problem is that select column is not recognize mine relationship or something like that also i can not add default value for the select column.
use Spatie\Permission\Models\Role as SpatieRole;
class Role extends SpatieRole
{
    // relationships
    public function user() :HasMany
    {
        return $this->hasMany(User::class);
    }
}
User model
    public function role()
    {
        return $this->belongsTo(Role::class);
    }
User table
 public static function table(Table $table): Table
    {
        return $table
            ->columns([
                Tables\Columns\TextColumn::make('name')
                    ->searchable(),
                Tables\Columns\TextColumn::make('email')
                    ->searchable(),

                Tables\Columns\SelectColumn::make('role')
                    ->searchable(),

                Tables\Columns\TextColumn::make('created_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
                Tables\Columns\TextColumn::make('updated_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
    }
Was this page helpful?