fixes on auth customers
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Datatables\Shop;
|
||||
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Order;
|
||||
use App\Repositories\Shop\Customers;
|
||||
use App\Repositories\Shop\Orders;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
@@ -27,7 +28,7 @@ class CustomerOrdersDataTable extends DataTable
|
||||
|
||||
public function query(Order $model)
|
||||
{
|
||||
$customerId = Auth::id();
|
||||
$customerId = Customers::getId();
|
||||
$model = $model->byCustomer($customerId);
|
||||
|
||||
return $this->buildQuery($model);
|
||||
|
||||
Reference in New Issue
Block a user