2
0
visuddhinanda 2 жил өмнө
parent
commit
a1f628f242

+ 7 - 2
app/Http/Resources/ArticleResource.php

@@ -193,9 +193,14 @@ class ArticleResource extends JsonResource
             }
             }
 
 
             $mode = $request->get('mode','read');
             $mode = $request->get('mode','read');
-            $data["html"] = MdRender::render($this->content,$channels,$query_id,$mode);
+            $format = $request->get('format','react');
+            $data["html"] = MdRender::render($this->content,
+                                            $channels,$query_id,$mode,
+                                            'translation','markdown',$format);
             if(empty($this->summary)){
             if(empty($this->summary)){
-                $data["_summary"] = MdRender::render($this->content,$channels,$query_id,$mode,'translation','markdown','text');
+                $data["_summary"] = MdRender::render($this->content,
+                                                    $channels,$query_id,$mode,
+                                                    'translation','markdown','text');
             }
             }
         }
         }
         return $data;
         return $data;