71 lines
1.4 KiB
PHP
71 lines
1.4 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Webkul\Admin\Http\Controllers\Sales;
|
||
|
|
|
||
|
|
use Illuminate\Http\Request;
|
||
|
|
use Illuminate\Http\Response;
|
||
|
|
use Webkul\Admin\Http\Controllers\Controller;
|
||
|
|
use Webkul\Sales\Repositories\OrderRepository as Order;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Sales Order controller
|
||
|
|
*
|
||
|
|
* @author Jitendra Singh <jitendra@webkul.com>
|
||
|
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||
|
|
*/
|
||
|
|
class OrderController extends Controller
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Display a listing of the resource.
|
||
|
|
*
|
||
|
|
* @return \Illuminate\Http\Response
|
||
|
|
*/
|
||
|
|
protected $_config;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* OrderRepository object
|
||
|
|
*
|
||
|
|
* @var array
|
||
|
|
*/
|
||
|
|
protected $order;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Create a new controller instance.
|
||
|
|
*
|
||
|
|
* @param Webkul\Sales\Repositories\OrderRepository $order
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function __construct(Order $order)
|
||
|
|
{
|
||
|
|
$this->middleware('admin');
|
||
|
|
|
||
|
|
$this->_config = request('_config');
|
||
|
|
|
||
|
|
$this->order = $order;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Display a listing of the resource.
|
||
|
|
*
|
||
|
|
* @return \Illuminate\Http\Response
|
||
|
|
*/
|
||
|
|
public function index()
|
||
|
|
{
|
||
|
|
return view($this->_config['view']);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Show the view for the specified resource.
|
||
|
|
*
|
||
|
|
* @param int $id
|
||
|
|
* @return \Illuminate\Http\Response
|
||
|
|
*/
|
||
|
|
public function view($id)
|
||
|
|
{
|
||
|
|
$order = $this->order->find($id);
|
||
|
|
|
||
|
|
return view($this->_config['view'], compact('order'));
|
||
|
|
}
|
||
|
|
}
|