2018-11-27 04:46:35 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Webkul\Admin\Http\Controllers;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
use Illuminate\Http\Response;
|
2018-12-07 05:25:33 +00:00
|
|
|
use Webkul\Admin\Facades\Configuration;
|
2018-11-27 04:46:35 +00:00
|
|
|
use Webkul\Core\Repositories\CoreConfigRepository as CoreConfig;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Configuration controller
|
|
|
|
|
*
|
|
|
|
|
* @author Jitendra Singh <jitendra@webkul.com>
|
|
|
|
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
|
|
|
|
*/
|
|
|
|
|
class ConfigurationController extends Controller
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Display a listing of the resource.
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
|
*/
|
|
|
|
|
protected $_config;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* CoreConfigRepository object
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $coreConfig;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new controller instance.
|
|
|
|
|
*
|
|
|
|
|
* @param Webkul\Core\Repositories\CoreConfigRepository $coreConfig
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(CoreConfig $coreConfig)
|
|
|
|
|
{
|
|
|
|
|
$this->middleware('admin');
|
|
|
|
|
|
|
|
|
|
$this->_config = request('_config');
|
|
|
|
|
|
|
|
|
|
$this->coreConfig = $coreConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Display a listing of the resource.
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
|
*/
|
|
|
|
|
public function index()
|
|
|
|
|
{
|
2018-12-13 10:58:28 +00:00
|
|
|
// if(!request()->route('slug'))
|
|
|
|
|
// return redirect()->route('admin.configuration.index', ['slug' => 'marketplace']);
|
|
|
|
|
|
2018-12-07 07:05:34 +00:00
|
|
|
return view($this->_config['view']);
|
2018-12-07 05:25:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Store a newly created resource in storage.
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
|
*/
|
|
|
|
|
public function store()
|
|
|
|
|
{
|
|
|
|
|
$data = request()->all();
|
|
|
|
|
|
|
|
|
|
session()->flash('success', 'Shipping Method is created successfully');
|
|
|
|
|
|
|
|
|
|
return redirect()->route($this->_config['redirect']);
|
2018-11-27 04:46:35 +00:00
|
|
|
}
|
|
|
|
|
}
|