added multi-select filters everywhere

This commit is contained in:
denisdulici
2018-11-02 11:32:42 +03:00
parent b0a7e98e4e
commit 9a85bb9f5a
25 changed files with 202 additions and 86 deletions

View File

@ -19,14 +19,19 @@ class Bills extends ModelFilter
return $this->whereLike('vendor_name', $query);
}
public function vendor($vendor)
public function vendors($vendors)
{
return $this->where('vendor_id', $vendor);
return $this->whereIn('vendor_id', (array) $vendors);
}
public function status($status)
public function categories($categories)
{
return $this->where('bill_status_code', $status);
return $this->whereIn('category_id', (array) $categories);
}
public function statuses($statuses)
{
return $this->whereIn('bill_status_code', (array) $statuses);
}
public function billDate($date)

View File

@ -19,19 +19,19 @@ class Payments extends ModelFilter
return $this->whereLike('description', $query);
}
public function vendor($vendor)
public function vendors($vendors)
{
return $this->where('vendor_id', $vendor);
return $this->whereIn('vendor_id', (array) $vendors);
}
public function category($category)
public function categories($categories)
{
return $this->where('category_id', $category);
return $this->whereIn('category_id', (array) $categories);
}
public function account($account)
public function accounts($accounts)
{
return $this->where('account_id', $account);
return $this->whereIn('account_id', (array) $accounts);
}
public function date($date)