minor fixes
This commit is contained in:
@@ -5,21 +5,20 @@ namespace App\Http\Controllers\Admin\Shop;
|
||||
use App\Datatables\Admin\Shop\CustomerAddressesDataTable;
|
||||
use App\Datatables\Admin\Shop\CustomersDataTable;
|
||||
use App\Repositories\Shop\Customers;
|
||||
use App\Repositories\Shop\Deliveries;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CustomerController extends Controller
|
||||
{
|
||||
public function index(CustomersDataTable $dataTable)
|
||||
{
|
||||
$data = [];
|
||||
$data = Customers::init();
|
||||
|
||||
return $dataTable->render('Admin.Shop.Customers.list', $data);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['deliveries'] = Deliveries::getOptions();
|
||||
$data = Customers::init();
|
||||
|
||||
return view('Admin.Shop.Customers.create', $data);
|
||||
}
|
||||
@@ -40,8 +39,8 @@ class CustomerController extends Controller
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Customers::init();
|
||||
$data['customer'] = Customers::edit($id);
|
||||
$data['deliveries'] = Deliveries::getOptions();
|
||||
$model = new CustomerAddressesDataTable();
|
||||
$data['customer_addresses'] = $model->html();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user