diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php index 9cdcd9589..78cfce137 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php @@ -54,8 +54,10 @@ class postsController extends Controller //posts item public function show($locale,$id){ + $path = Config::get('app.cdn').Config::get('cms.storage.media.path'); + //$post = $this->Post::find($id,['id','content_html','author','slug', 'afisha_phone', 'afisha_address', 'afisha_phone_new']); + $post = $this->Post::where('id', $id)->select('id', 'content_html', 'author', 'title','slug','published_at', 'more_photo','afisha_phone', 'afisha_address', 'afisha_phone_new', DB::raw("IF(featured_image<>'',concat('$path',featured_image),featured_image) as main_image"))->with(['categories:id,name'])->first(); - $post = $this->Post::find($id,['id','content_html','author','slug', 'afisha_phone', 'afisha_address', 'afisha_phone_new',]); if(!is_null($post)) { diff --git a/themes/modern2/partials/newHome/main-popular.htm b/themes/modern2/partials/newHome/main-popular.htm index 1b873f7e8..32b088726 100644 --- a/themes/modern2/partials/newHome/main-popular.htm +++ b/themes/modern2/partials/newHome/main-popular.htm @@ -30,7 +30,7 @@ random = 0