fixes
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Admin\Shop\CustomerAddressesDataTable;
|
||||
use App\Datatables\Admin\Shop\CustomerInvoicesDataTable;
|
||||
use App\Datatables\Admin\Shop\CustomerOrdersDataTable;
|
||||
use App\Datatables\Admin\Shop\CustomersDataTable;
|
||||
use App\Repositories\Shop\Customers;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -32,17 +34,21 @@ class CustomerController extends Controller
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data['customer'] = Customers::get($id);
|
||||
$data = [
|
||||
'customer' => Customers::get($id),
|
||||
];
|
||||
|
||||
return view('Admin.Shop.Customers.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Customers::init();
|
||||
$data['customer'] = Customers::edit($id);
|
||||
$model = new CustomerAddressesDataTable();
|
||||
$data['customer_addresses'] = $model->html();
|
||||
$data = Customers::init() + [
|
||||
'customer' => Customers::edit($id),
|
||||
'customer_addresses' => (new CustomerAddressesDataTable())->html(),
|
||||
'customer_invoices' => (new CustomerInvoicesDataTable())->html(),
|
||||
'customer_orders' => (new CustomerOrdersDataTable())->html(),
|
||||
];
|
||||
|
||||
return view('Admin.Shop.Customers.edit', $data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user