<?php namespace Ebuy\Product; use User; class Product { /** * $product object. */ protected $product; /** * $category object. */ protected $category; /** * $brand object. */ protected $brand; /** * Constructor. */ public function __construct(\Ebuy\Product\Interfaces\ProductRepositoryInterface $product, \Ebuy\Product\Interfaces\CategoryRepositoryInterface $category, \Ebuy\Product\Interfaces\BrandRepositoryInterface $brand) { $this->product = $product; $this->category = $category; $this->brand = $brand; } /** * Returns count of product. * * @param array $filter * * @return int */ public function count() { return 0; } /** * Find product by slug. * * @param array $filter * * @return int */ public function product($slug) { return $this->product ->findBySlug($slig) ->toArray(); } }