소스 검색

album disk

Andrew 2 달 전
부모
커밋
4155f0f59d
1개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 2
    5
      app/Filament/Resources/AlbumResource.php

+ 2
- 5
app/Filament/Resources/AlbumResource.php 파일 보기

65
                         ->closeOnDateSelection(),
65
                         ->closeOnDateSelection(),
66
                     ])->columnSpanFull()->columns(2),
66
                     ])->columnSpanFull()->columns(2),
67
                     FileUpload::make('news_banner')->label("列表大圖")
67
                     FileUpload::make('news_banner')->label("列表大圖")
68
-                    ->disk("s3")
69
                     ->directory("album/img")
68
                     ->directory("album/img")
70
                     ->helperText('建議寬高限制為:2000*720px,出血寬度720px,主要圖像範圍為:1280*720px,檔案大小限制為1M以下')->maxSize('1024'),
69
                     ->helperText('建議寬高限制為:2000*720px,出血寬度720px,主要圖像範圍為:1280*720px,檔案大小限制為1M以下')->maxSize('1024'),
71
                     FileUpload::make('news_img_pc')->label("列表圖(desktop)")
70
                     FileUpload::make('news_img_pc')->label("列表圖(desktop)")
72
-                    ->disk("s3")
73
                     ->directory("album/img")
71
                     ->directory("album/img")
74
                     ->helperText('建議寬高限制為:1280*720px,檔案大小限制為1M以下')->maxSize('1024'),
72
                     ->helperText('建議寬高限制為:1280*720px,檔案大小限制為1M以下')->maxSize('1024'),
75
                     FileUpload::make('news_img_mobile')->label("列表圖(mobile)")
73
                     FileUpload::make('news_img_mobile')->label("列表圖(mobile)")
76
-                    ->disk("s3")
77
                     ->directory("album/img")
74
                     ->directory("album/img")
78
                     ->helperText('建議寬高限制為:600x896px,檔案大小限制為1M以下')->maxSize('1024'),
75
                     ->helperText('建議寬高限制為:600x896px,檔案大小限制為1M以下')->maxSize('1024'),
79
                     Translate::make()->schema(fn (string $locale) => [
76
                     Translate::make()->schema(fn (string $locale) => [
96
                             TextInput::make('link_video')->label("網址")->nullable(),
93
                             TextInput::make('link_video')->label("網址")->nullable(),
97
                         ])->visible(fn (Get $get):bool => $get("upload_type") == 1)->columnSpanFull(),
94
                         ])->visible(fn (Get $get):bool => $get("upload_type") == 1)->columnSpanFull(),
98
                         Group::make()->schema([
95
                         Group::make()->schema([
99
-                            FileUpload::make('link_upload')->label("")->disk("s3")->directory("album/video")
96
+                            FileUpload::make('link_upload')->label("")->directory("album/video")
100
                             ->helperText('建議影片寬高限制為:1920*1080px,出血寬度720px,大小限制為:100M以下')
97
                             ->helperText('建議影片寬高限制為:1920*1080px,出血寬度720px,大小限制為:100M以下')
101
                             ->maxSize(102400)->nullable(),
98
                             ->maxSize(102400)->nullable(),
102
                         ])->visible(fn (Get $get):bool => $get("upload_type") == 2)->columnSpanFull(),
99
                         ])->visible(fn (Get $get):bool => $get("upload_type") == 2)->columnSpanFull(),
116
                 TextColumn::make("albumCategory.name")->label("分類")->alignCenter(),
113
                 TextColumn::make("albumCategory.name")->label("分類")->alignCenter(),
117
                 TextColumn::make("title")->label("標題")->alignCenter(),
114
                 TextColumn::make("title")->label("標題")->alignCenter(),
118
                 TextColumn::make("post_date")->date()->alignCenter(),
115
                 TextColumn::make("post_date")->date()->alignCenter(),
119
-                ImageColumn::make("news_img_pc")->disk('s3')->alignCenter(),
116
+                ImageColumn::make("news_img_pc")->alignCenter(),
120
                 TextColumn::make("list_audit_state")->label("狀態")->badge()
117
                 TextColumn::make("list_audit_state")->label("狀態")->badge()
121
                 ->color(fn (string $state): string => match ($state) {
118
                 ->color(fn (string $state): string => match ($state) {
122
                     '暫存' => 'warning',
119
                     '暫存' => 'warning',