ProductController
extends Controller
in package
Table of Contents
- $invoiceService : InvoiceService
- $productService : ProductService
- $serviceService : ServiceService
- __construct() : mixed
- cloudInvoices() : BaseInvoiceResourceCollection
- fetchBennuCloudServices() : ProductResourceCollection|JsonResponse
- getServices() : ServiceResourceCollection|JsonResponse
- index() : ProductResourceCollection|JsonResponse
- Retrieves the products meeting the criteria of the request
- show() : ProductResource
- Display the specified product.
Properties
$invoiceService
protected
InvoiceService
$invoiceService
$productService
protected
ProductService
$productService
$serviceService
protected
ServiceService
$serviceService
Methods
__construct()
public
__construct(ProductService $productService, ServiceService $serviceService, InvoiceService $invoiceService) : mixed
Parameters
- $productService : ProductService
- $serviceService : ServiceService
- $invoiceService : InvoiceService
Return values
mixed —cloudInvoices()
public
cloudInvoices(Request $request, int $productId) : BaseInvoiceResourceCollection
Parameters
- $request : Request
- $productId : int
Return values
BaseInvoiceResourceCollection —fetchBennuCloudServices()
public
fetchBennuCloudServices(Request $request) : ProductResourceCollection|JsonResponse
Parameters
- $request : Request
Return values
ProductResourceCollection|JsonResponse —getServices()
public
getServices(int $productId) : ServiceResourceCollection|JsonResponse
Parameters
- $productId : int
Return values
ServiceResourceCollection|JsonResponse —index()
Retrieves the products meeting the criteria of the request
public
index(Request $request) : ProductResourceCollection|JsonResponse
Parameters
- $request : Request
Return values
ProductResourceCollection|JsonResponse —the users (paginated)
show()
Display the specified product.
public
show(int $id) : ProductResource
Parameters
- $id : int
-
the field to search for
Return values
ProductResource —the product resource instance