|
|
|
|
|
|
104
|
'1' => 'heroicon-o-photo',
|
104
|
'1' => 'heroicon-o-photo',
|
|
105
|
'2' => 'heroicon-o-film',
|
105
|
'2' => 'heroicon-o-film',
|
|
106
|
}),
|
106
|
}),
|
|
107
|
- ImageColumn::make('img_url')->label('圖片')
|
|
|
|
108
|
- ->visible(fn($record, $state) => $record->type == 1),
|
|
|
|
|
|
107
|
+ ImageColumn::make('img_url')->label('圖片')->getStateUsing(fn($record) => $record->type == 1 ? $record->img_url : null),
|
|
109
|
TextColumn::make('title')->label('標題')
|
108
|
TextColumn::make('title')->label('標題')
|
|
110
|
->formatStateUsing(fn($record, $state) => $record->type == 1 ? $state : '-'),
|
109
|
->formatStateUsing(fn($record, $state) => $record->type == 1 ? $state : '-'),
|
|
111
|
TextColumn::make('video_url')->label('影片網址')
|
110
|
TextColumn::make('video_url')->label('影片網址')
|