search users/customers/vendors by email
This commit is contained in:
parent
f1cd07dd70
commit
f0028ca313
@ -16,7 +16,7 @@ class Users extends ModelFilter
|
||||
|
||||
public function search($query)
|
||||
{
|
||||
return $this->whereLike('name', $query);
|
||||
return $this->where('name', 'LIKE', '%' . $query . '%')->orWhere('email', 'LIKE', '%' . $query . '%');
|
||||
}
|
||||
|
||||
public function role($roles)
|
||||
|
@ -16,6 +16,6 @@ class Vendors extends ModelFilter
|
||||
|
||||
public function search($query)
|
||||
{
|
||||
return $this->whereLike('name', $query);
|
||||
return $this->where('name', 'LIKE', '%' . $query . '%')->orWhere('email', 'LIKE', '%' . $query . '%');
|
||||
}
|
||||
}
|
@ -16,6 +16,6 @@ class Customers extends ModelFilter
|
||||
|
||||
public function search($query)
|
||||
{
|
||||
return $this->whereLike('name', $query);
|
||||
return $this->where('name', 'LIKE', '%' . $query . '%')->orWhere('email', 'LIKE', '%' . $query . '%');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user