FilamentF
Filament3y ago
Jaw

How can i get a value from previous column?

TextColumn::make('fileable_type')
    ->sortable()
    ->searchable()
    ->label('Resource')
    ->formatStateUsing(function ($state) {
        $modelName = explode('\\', $state);
        return $modelName[count($modelName) - 1];
    }),
TextColumn::make('fileable_id')
    ->sortable()
    ->searchable()
    ->formatStateUsing(function ($state) {
        // how can i get `fileable_type` here
    })


i want to retrive fileable_type in second column.
Was this page helpful?