Restrict scope filter
This commit is contained in:
parent
a5f4a369ab
commit
c6dd901203
1 changed files with 5 additions and 0 deletions
|
|
@ -161,6 +161,11 @@ class EntityModel extends Eloquent
|
|||
|
||||
$query->where($this->getTable() .'.account_id', '=', $accountId);
|
||||
|
||||
if (func_num_args() > 1 && ! $publicId) {
|
||||
$query->where('id', '=', 0);
|
||||
return $query;
|
||||
}
|
||||
|
||||
if ($publicId) {
|
||||
if (is_array($publicId)) {
|
||||
$query->whereIn('public_id', $publicId);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue