ProductImageRepository.php 554 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Shop\ProductImages;
  3. use Jsdecena\Baserepo\BaseRepository;
  4. use App\Shop\Products\Product;
  5. class ProductImageRepository extends BaseRepository
  6. {
  7. /**
  8. * ProductImageRepository constructor.
  9. * @param ProductImage $productImage
  10. */
  11. public function __construct(ProductImage $productImage)
  12. {
  13. parent::__construct($productImage);
  14. $this->model = $productImage;
  15. }
  16. /**
  17. * @return mixed
  18. */
  19. public function findProduct() : Product
  20. {
  21. return $this->model->product;
  22. }
  23. }