merged
This commit is contained in:
parent
23561e1d1d
commit
33fdf0d24c
|
|
@ -2,46 +2,11 @@
|
|||
|
||||
namespace Webkul\Velocity\Repositories\Product;
|
||||
|
||||
use DB;
|
||||
use Illuminate\Container\Container as App;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Webkul\Product\Repositories\ProductFlatRepository;
|
||||
use Webkul\Product\Models\ProductAttributeValue;
|
||||
|
||||
/**
|
||||
* Product Repository
|
||||
*
|
||||
* @author Jitendra Singh <jitendra@webkul.com>
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class ProductRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* AttributeRepository object
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $attributeRepository;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @param Webkul\Attribute\Repositories\AttributeRepository $attributeRepository
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
AttributeRepository $attributeRepository,
|
||||
App $app
|
||||
)
|
||||
{
|
||||
$this->attributeRepository = $attributeRepository;
|
||||
|
||||
parent::__construct($app);
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify Model class name
|
||||
*
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ return [
|
|||
'status' => 'Status',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'featured-product' => 'Featured Product'
|
||||
],
|
||||
'category' => [
|
||||
'icon-status' => 'Category Icon Status',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
@php
|
||||
$count = 4;
|
||||
$config = core()->getConfigData('velocity.configuration.general.featured_product');
|
||||
|
||||
if ($config > 4)
|
||||
$count = $config;
|
||||
else
|
||||
$count = 4;
|
||||
|
||||
$featuredProducts = app('Webkul\Velocity\Repositories\Product\ProductRepository')->getFeaturedProducts($count);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue