fixes
This commit is contained in:
@@ -17,9 +17,19 @@ class CustomerAddressesDataTable extends DataTable
|
||||
|
||||
public function query(CustomerAddress $model)
|
||||
{
|
||||
$model = self::filterByCustomer($model);
|
||||
|
||||
return $this->buildQuery($model);
|
||||
}
|
||||
|
||||
public static function filterByCustomer($model, $customerId = false)
|
||||
{
|
||||
$customerId = $customerId ? $customerId : self::isFilteredByField('customer_id');
|
||||
|
||||
return $customerId ? $model->byCustomer($customerId) : $model;
|
||||
}
|
||||
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user