Browse Source

存在title时修改title

duqinya 5 years ago
parent
commit
57f8cc97ad
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/Repositories/PlatformContentRepository.php

+ 3 - 0
app/Repositories/PlatformContentRepository.php

@@ -53,6 +53,9 @@ class PlatformContentRepository
         $platforms = $this->platformContent->where('id', $request['id'])->first();
         $platforms->content = $request['content'];
         $platforms->updated_at = date('Y-m-d H:i:s');
+        if (isset($request['title'])){
+            $platforms->title = $request['title'];
+        }
 
         $res = $platforms->save();
         if (!$res) {