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
})
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
})