<?php namespace App\Products;
class ProductComposer
{
/** @var ProductService $productService */
private $productService;
public function __construct()
{
$this->productService = app()->make(ProductService::class);
}
public function getAll($view)
{
$view->with('composedProducts', $this->productService->getAllProducts());
}
}