server fixes

This commit is contained in:
root 2023-09-05 11:02:22 +00:00
parent 88ad9c6e67
commit ab56a005f2
16 changed files with 8 additions and 10 deletions

0
bootstrap/cache/.gitignore vendored Normal file → Executable file
View File

View File

@ -8,7 +8,7 @@ use Webkul\RestApi\Http\Controllers\V1\Shop\ResourceController;
class Banners extends 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. * Resource class name.
* *
@ -38,4 +38,4 @@ class Banners extends ResourceController
{ {
return false; return false;
} }
} }

View File

@ -11,7 +11,7 @@ use Webkul\RestApi\Http\Controllers\V1\Shop\Catalog\CategoryController;
class Categories extends 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. * Repository class name.
* *
@ -32,19 +32,17 @@ class Categories extends CategoryController
} }
public function filters($id){ public function filters($id){
$category = $this->getRepositoryInstance()->with(['filterableAttributes','brands' => function ($q){ $category = $this->getRepositoryInstance()->with(['filterableAttributes'])
$q->take(20)->orderBy('position', 'desc')->orderBy('name', 'asc');
} ])
->find($id); ->find($id);
if($category) if($category)
return response([ return response([
'attributes' => Attribute::collection($category->filterableAttributes), 'attributes' => Attribute::collection($category->filterableAttributes),
'brands' => Brand::collection($category->brands), //'brands' => Brand::collection($category->brands),
]); ]);
else{ else{
return response(['error'=>'not found'],404); return response(['error'=>'not found'],404);
} }
} }
} }

View File

@ -10,7 +10,7 @@ use Webkul\RestApi\Http\Controllers\V1\Shop\Customer\OrderController;
class Orders extends 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, public function __construct(protected OrderRepository $orderRepository,
protected OrderItemRepository $orderItemRepository) protected OrderItemRepository $orderItemRepository)
{ {
@ -51,4 +51,4 @@ class Orders extends OrderController
]); ]);
} }
} }
} }

0
storage/app/.gitignore vendored Normal file → Executable file
View File

0
storage/app/private/.gitignore vendored Normal file → Executable file
View File

0
storage/app/public/.gitignore vendored Normal file → Executable file
View File

0
storage/debugbar/.gitignore vendored Normal file → Executable file
View File

0
storage/fonts/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/cache/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/cache/data/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/sessions/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/testing/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/views/.gitignore vendored Normal file → Executable file
View File

0
storage/logs/.gitignore vendored Normal file → Executable file
View File