server fixes
This commit is contained in:
parent
88ad9c6e67
commit
ab56a005f2
|
|
@ -8,7 +8,7 @@ use Webkul\RestApi\Http\Controllers\V1\Shop\ResourceController;
|
|||
|
||||
class Banners extends ResourceController
|
||||
{
|
||||
protected $requestException = ['page', 'limit', 'pagination', 'sort', 'order', 'token','locale'];
|
||||
protected $requestException = ['page', 'limit', 'pagination', 'sort', 'order', 'token','locale', '/api/sliders'];
|
||||
/**
|
||||
* Resource class name.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use Webkul\RestApi\Http\Controllers\V1\Shop\Catalog\CategoryController;
|
|||
|
||||
class Categories extends CategoryController
|
||||
{
|
||||
protected $requestException = ['page', 'limit', 'pagination', 'sort', 'order', 'token','locale'];
|
||||
protected $requestException = ['page', 'limit', 'pagination', 'sort', 'order', 'token','locale', '/api/categories'];
|
||||
/**
|
||||
* Repository class name.
|
||||
*
|
||||
|
|
@ -32,15 +32,13 @@ class Categories extends CategoryController
|
|||
}
|
||||
|
||||
public function filters($id){
|
||||
$category = $this->getRepositoryInstance()->with(['filterableAttributes','brands' => function ($q){
|
||||
$q->take(20)->orderBy('position', 'desc')->orderBy('name', 'asc');
|
||||
} ])
|
||||
$category = $this->getRepositoryInstance()->with(['filterableAttributes'])
|
||||
->find($id);
|
||||
|
||||
if($category)
|
||||
return response([
|
||||
'attributes' => Attribute::collection($category->filterableAttributes),
|
||||
'brands' => Brand::collection($category->brands),
|
||||
//'brands' => Brand::collection($category->brands),
|
||||
]);
|
||||
else{
|
||||
return response(['error'=>'not found'],404);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use Webkul\RestApi\Http\Controllers\V1\Shop\Customer\OrderController;
|
|||
|
||||
class Orders extends OrderController
|
||||
{
|
||||
protected $requestException = ['page', 'limit', 'pagination', 'sort', 'order', 'token','locale'];
|
||||
protected $requestException = ['page', 'limit', 'pagination', 'sort', 'order', 'token','locale', '/api/customer/orders'];
|
||||
public function __construct(protected OrderRepository $orderRepository,
|
||||
protected OrderItemRepository $orderItemRepository)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue