浏览代码

260116 最新消息草稿預覽

OMEGA\lulufj.ho 2 周前
父节点
当前提交
ab491480fe
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      app/Filament/Resources/NewsResource.php

+ 2
- 1
app/Filament/Resources/NewsResource.php 查看文件

@@ -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
             ])