PATH:
home
/
lab2454c
/
vaultchip.com
/
platform
/
plugins
/
ecommerce
/
src
/
Repositories
/
Eloquent
<?php namespace Botble\Ecommerce\Repositories\Eloquent; use Botble\Ecommerce\Repositories\Interfaces\ProductCollectionInterface; use Botble\Support\Repositories\Eloquent\RepositoriesAbstract; use Illuminate\Support\Str; class ProductCollectionRepository extends RepositoriesAbstract implements ProductCollectionInterface { /** * {@inheritDoc} */ public function createSlug($name, $id) { $slug = Str::slug($name); $index = 1; $baseSlug = $slug; while ($this->model->where('slug', $slug)->where('id', '!=', $id)->count() > 0) { $slug = $baseSlug . '-' . $index++; } if (empty($slug)) { $slug = time(); } $this->resetModel(); return $slug; } }
[-] ProductAttributeSetRepository.php
[edit]
[-] ProductTagRepository.php
[edit]
[-] ProductAttributeRepository.php
[edit]
[-] ReviewRepository.php
[edit]
[-] FlashSaleRepository.php
[edit]
[+]
..
[-] OrderRepository.php
[edit]
[-] CurrencyRepository.php
[edit]
[-] ProductCollectionRepository.php
[edit]
[-] TaxRepository.php
[edit]
[-] ProductCategoryRepository.php
[edit]
[-] OrderProductRepository.php
[edit]
[-] ShipmentRepository.php
[edit]
[-] ShippingRuleRepository.php
[edit]
[-] ShipmentHistoryRepository.php
[edit]
[-] WishlistRepository.php
[edit]
[-] DiscountRepository.php
[edit]
[-] OrderAddressRepository.php
[edit]
[-] CustomerRepository.php
[edit]
[-] AddressRepository.php
[edit]
[-] ShippingRuleItemRepository.php
[edit]
[-] OrderHistoryRepository.php
[edit]
[-] ProductVariationItemRepository.php
[edit]
[-] GroupedProductRepository.php
[edit]
[-] StoreLocatorRepository.php
[edit]
[-] BrandRepository.php
[edit]
[-] ProductVariationRepository.php
[edit]
[-] ProductRepository.php
[edit]
[-] ProductLabelRepository.php
[edit]
[-] ShippingRepository.php
[edit]