Andrew пре 2 месеци
родитељ
комит
1851675a6f
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3
    3
      app/Filament/Resources/BannerResource.php

+ 3
- 3
app/Filament/Resources/BannerResource.php Прегледај датотеку

105
                         '2' => 'heroicon-o-film',
105
                         '2' => 'heroicon-o-film',
106
                     }),
106
                     }),
107
                 ImageColumn::make('img_url')->label('圖片')
107
                 ImageColumn::make('img_url')->label('圖片')
108
-                    ->visible(fn ($record): bool => $record->type == 1),
108
+                    ->visible(fn ($record): bool => $record?->type == 1),
109
                 TextColumn::make('title')->label('標題')
109
                 TextColumn::make('title')->label('標題')
110
-                    ->visible(fn ($record): bool => $record->type == 1),
110
+                    ->visible(fn ($record): bool => $record?->type == 1),
111
                 TextColumn::make('video_url')->label('影片網址')
111
                 TextColumn::make('video_url')->label('影片網址')
112
-                    ->visible(fn ($record): bool => $record->type == 2),
112
+                    ->visible(fn ($record): bool => $record?->type == 2),
113
             ])
113
             ])
114
             ->filters([
114
             ->filters([
115
         //
115
         //