Browse Source

260116 最新消息草稿預覽

OMEGA\lulufj.ho 2 weeks ago
parent
commit
ab491480fe
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      app/Filament/Resources/NewsResource.php

+ 2
- 1
app/Filament/Resources/NewsResource.php View File

@@ -245,6 +245,7 @@ class NewsResource extends Resource
245 245
 
246 246
     public static function table(Table $table): Table
247 247
     {
248
+        $url = env('APP_URL')=="https://webdev.yico.tw:8088" ? "https://demo.blockstudio.tw/yichiu/zh/news/" : "https://blockstudio.tw/yichiu/zh/news/" ;
248 249
         return $table
249 250
             ->columns([
250 251
                 //
@@ -328,7 +329,7 @@ class NewsResource extends Resource
328 329
                 ->label('前台預覽')
329 330
                 ->icon('heroicon-m-arrow-top-right-on-square')
330 331
                 ->color('info')
331
-                ->url(fn ($record) => "https://demo.blockstudio.tw/yichiu/zh/news/{$record->id}?preview=true")
332
+                ->url(fn ($record) => $url.$record->id."?preview=true")
332 333
                 ->openUrlInNewTab()
333 334
                 ->outlined(),
334 335
             ])