sarga/packages/Webkul/Tax/src/Http/Controllers/TaxController.php

89 lines
1.9 KiB
PHP
Raw Normal View History

<?php
2018-10-11 14:25:59 +00:00
namespace Webkul\Tax\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Webkul\Core\Repositories\ChannelRepository as Channel;
2018-10-17 07:21:47 +00:00
use Webkul\Tax\Repositories\TaxCategoryRepository as TaxCategory;
2018-10-15 10:39:09 +00:00
use Webkul\Tax\Repositories\TaxRateRepository as TaxRate;
2018-10-11 14:25:59 +00:00
use Webkul\Tax\Repositories\TaxMapRepository as TaxMap;
/**
* Tax controller
*
* @author Prashant Singh <prashant.singh852@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class TaxController extends Controller
{
/**
* Contains route related configuration
*
* @var array
*/
protected $_config;
/**
* ChannelRepository object
*
* @var array
*/
protected $channel;
/**
2018-10-17 07:21:47 +00:00
* Tax Category Repository object
*
* @var array
*/
2018-10-17 07:21:47 +00:00
protected $taxCategory;
/**
* Tax Rate Repository object
*
* @var array
*/
protected $taxRate;
/**
* Tax Map Repository object
*
* @var array
*/
protected $taxMap;
/**
* Create a new controller instance.
*
* @param \Webkul\Core\Repositories\ChannelRepository $channel
* @param \Webkul\Tax\Repositories\TaxCategoryRepository $taxCategory
* @param \Webkul\Tax\Repositories\TaxRateRepository $taxRate
* @param \Webkul\Tax\Repositories\TaxMapRepository $taxMap
* @return void
*/
2018-10-17 07:21:47 +00:00
public function __construct(Channel $channel, TaxCategory $taxCategory, TaxRate $taxRate, TaxMap $taxMap)
{
$this->middleware('admin');
$this->channel = $channel;
2018-10-17 07:21:47 +00:00
$this->taxCategory = $taxCategory;
$this->taxRate = $taxRate;
$this->taxMap = $taxMap;
$this->_config = request('_config');
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view($this->_config['view']);
}
}