2018-08-31 06:03:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
2018-10-11 14:25:59 +00:00
|
|
|
namespace Webkul\Tax\Http\Controllers;
|
2018-08-31 06:03:11 +00:00
|
|
|
|
|
|
|
|
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;
|
2018-08-31 06:03:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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
|
2018-08-31 06:03:11 +00:00
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
2018-10-17 07:21:47 +00:00
|
|
|
protected $taxCategory;
|
2018-08-31 06:03:11 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Tax Rate Repository object
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $taxRate;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Tax Map Repository object
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $taxMap;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new controller instance.
|
|
|
|
|
*
|
2019-04-08 11:18:43 +00:00
|
|
|
* @param \Webkul\Core\Repositories\ChannelRepository $channel
|
|
|
|
|
* @param \Webkul\Tax\Repositories\TaxCategoryRepository $taxCategory
|
|
|
|
|
* @param \Webkul\Tax\Repositories\TaxRateRepository $taxRate
|
|
|
|
|
* @param \Webkul\Tax\Repositories\TaxMapRepository $taxMap
|
2018-08-31 06:03:11 +00:00
|
|
|
* @return void
|
|
|
|
|
*/
|
2018-10-17 07:21:47 +00:00
|
|
|
public function __construct(Channel $channel, TaxCategory $taxCategory, TaxRate $taxRate, TaxMap $taxMap)
|
2018-08-31 06:03:11 +00:00
|
|
|
{
|
|
|
|
|
$this->middleware('admin');
|
|
|
|
|
|
|
|
|
|
$this->channel = $channel;
|
|
|
|
|
|
2018-10-17 07:21:47 +00:00
|
|
|
$this->taxCategory = $taxCategory;
|
2018-08-31 06:03:11 +00:00
|
|
|
|
|
|
|
|
$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']);
|
|
|
|
|
}
|
|
|
|
|
}
|