ProductGroupController
extends Controller
in package
Table of Contents
- $productGroupService : ProductGroupService
- $productService : ProductService
- __construct() : mixed
- getProducts() : ProductResourceCollection|JsonResponse
- index() : ProductGroupResourceCollection|JsonResponse
- Retrieves the ProductGroup's meeting the criteria of the request
- show() : ProductGroupResource
- Display the specified ProductGroup.
Properties
$productGroupService
protected
ProductGroupService
$productGroupService
$productService
protected
ProductService
$productService
Methods
__construct()
public
__construct(ProductGroupService $productGroupService, ProductService $productService) : mixed
Parameters
- $productGroupService : ProductGroupService
- $productService : ProductService
Return values
mixed —getProducts()
public
getProducts(int $productGroupId) : ProductResourceCollection|JsonResponse
Parameters
- $productGroupId : int
Return values
ProductResourceCollection|JsonResponse —index()
Retrieves the ProductGroup's meeting the criteria of the request
public
index(Request $request) : ProductGroupResourceCollection|JsonResponse
Parameters
- $request : Request
Return values
ProductGroupResourceCollection|JsonResponse —the ProductGroup's (paginated)
show()
Display the specified ProductGroup.
public
show(int $id) : ProductGroupResource
Parameters
- $id : int
-
the field to search for
Return values
ProductGroupResource —the ProductGroup resource instance