mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Filtering by is_custom
This commit is contained in:
parent
3adb74cc22
commit
50cb855579
@ -64,4 +64,18 @@ class DesignFilters extends QueryFilters
|
|||||||
{
|
{
|
||||||
return $this->builder->where('company_id', auth()->user()->company()->id)->orWhere('company_id', null)->orderBy('id', 'asc');
|
return $this->builder->where('company_id', auth()->user()->company()->id)->orWhere('company_id', null)->orderBy('id', 'asc');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the designs by `is_custom` column.
|
||||||
|
*
|
||||||
|
* @return Illuminate\Database\Query\Builder
|
||||||
|
*/
|
||||||
|
public function custom(string $custom): Builder
|
||||||
|
{
|
||||||
|
if (strlen($custom) === 0) {
|
||||||
|
return $this->builder;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->builder->where('is_custom', filter_var($custom, FILTER_VALIDATE_BOOLEAN));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user