Andrew 2 kuukautta sitten
vanhempi
commit
1851675a6f
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3
    3
      app/Filament/Resources/BannerResource.php

+ 3
- 3
app/Filament/Resources/BannerResource.php Näytä tiedosto

@@ -105,11 +105,11 @@ class BannerResource extends Resource
105 105
                         '2' => 'heroicon-o-film',
106 106
                     }),
107 107
                 ImageColumn::make('img_url')->label('圖片')
108
-                    ->visible(fn ($record): bool => $record->type == 1),
108
+                    ->visible(fn ($record): bool => $record?->type == 1),
109 109
                 TextColumn::make('title')->label('標題')
110
-                    ->visible(fn ($record): bool => $record->type == 1),
110
+                    ->visible(fn ($record): bool => $record?->type == 1),
111 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 114
             ->filters([
115 115
         //