From 99dc423d5387382fc900830c913898029448893e Mon Sep 17 00:00:00 2001 From: merdan Date: Thu, 17 Jun 2021 17:32:43 +0500 Subject: [PATCH] featured --- .../apigenerator/controllers/api/postsController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php index 74d2f60b6..00a56ee27 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php @@ -38,7 +38,9 @@ class postsController extends Controller public function show($locale,$id){ - $post = $this->Post::find($id,['id','content_html','author']); + $post = $this->Post::find($id,['id','content_html','author','slug']); + + $post->url = $this->pageUrl('post',['id'=>$post->id,'slug'=>$post->slug]); if(!is_null($post)) { $obj = Db::table('vdomah_blogviews_views')