route version 208
This commit is contained in:
parent
fc1beed148
commit
1e0572c376
|
|
@ -22,6 +22,7 @@ class CategoriesController extends Controller
|
|||
|
||||
public function index(){
|
||||
|
||||
//categories list
|
||||
$data = $this->Category->select('id','name')
|
||||
->with(['translations:model_id,locale,attribute_data'])
|
||||
->where('status',1)
|
||||
|
|
@ -31,6 +32,7 @@ class CategoriesController extends Controller
|
|||
return $this->helpers->apiArrayResponseBuilder(200, 'success', $data);
|
||||
}
|
||||
|
||||
//categories item
|
||||
public function show($id){
|
||||
|
||||
$data = $this->Category::find($id);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class postsController extends Controller
|
|||
$this->helpers = $helpers;
|
||||
}
|
||||
|
||||
//postes list
|
||||
public function index(){
|
||||
$path = Config::get('app.cdn').Config::get('cms.storage.media.path');
|
||||
$data = $this->Post::with(['categories:id,name'])->listFrontEnd([
|
||||
|
|
@ -43,6 +44,7 @@ class postsController extends Controller
|
|||
return $this->helpers->apiArrayResponseBuilder(200, 'success', $data);
|
||||
}
|
||||
|
||||
//posts item
|
||||
public function show($locale,$id){
|
||||
|
||||
$post = $this->Post::find($id,['id','content_html','author','slug']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue