Moved Channel Remaining Initialization Property To Constructor As Its Previously Defined There
This commit is contained in:
parent
eadc2cc0a6
commit
03c0b9938e
|
|
@ -28,17 +28,17 @@ class ProductDataGrid extends DataGrid
|
|||
{
|
||||
parent::__construct();
|
||||
|
||||
/* locale */
|
||||
$this->locale = request()->get('locale') ?? 'all';
|
||||
|
||||
/* finding channel name */
|
||||
$this->channel = request()->get('channel') ?? 'all';
|
||||
$this->channel = Channel::find($this->channel);
|
||||
$this->channel = $this->channel ? $this->channel->code : 'all';
|
||||
}
|
||||
|
||||
public function prepareQueryBuilder()
|
||||
{
|
||||
/* finding channel name */
|
||||
$this->channel = Channel::find($this->channel);
|
||||
$this->channel = $this->channel ? $this->channel->code : 'all';
|
||||
|
||||
/* query builder */
|
||||
$queryBuilder = DB::table('product_flat')
|
||||
->leftJoin('products', 'product_flat.product_id', '=', 'products.id')
|
||||
|
|
|
|||
Loading…
Reference in New Issue