Browse Source

定时任务

Silent 6 năm trước cách đây
mục cha
commit
65cf45a89c
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      app/Http/Controllers/Admin/SettingController.php

+ 3 - 3
app/Http/Controllers/Admin/SettingController.php

xqd
@@ -83,15 +83,15 @@ class SettingController extends Controller
 
     public function generateSharePhoto(Request $request)
     {
-        $share_image = $this->where('key', 'share_image')->first();
+        $share_image = $this->model->where('key', 'share_image')->first();
         if(empty($share_image) || empty($share_image->value) || !Storage::disk('upload')->exists($share_image->value)) {
             return $this->showWarning('分享图片错误或未设置');
         }
-        $share_text = $this->where('key', 'share_text')->first();
+        $share_text = $this->model->where('key', 'share_text')->first();
         if(empty($share_text) || empty($share_text->value)) {
             return $this->showWarning('分享文字错误或未设置');
         }
-        $share_text_pos = $this->where('key', 'share_text_pos')->first();
+        $share_text_pos = $this->model->where('key', 'share_text_pos')->first();
         if(empty($share_text_pos) || empty($share_text_pos->value) || count($pos = explode(',', $share_text_pos->value)) < 2) {
             return $this->showWarning('分享文字位置错误或未设置');
         }