Fix syntax error in CustomersController@ajaxSearch

This commit is contained in:
Antoine Le Gonidec 2024-07-08 12:51:54 +02:00
parent aa9c1624a1
commit 3f48a3cf60
Signed by: vv221
GPG key ID: 636B78F91CEB80D8

View file

@ -250,6 +250,7 @@ class CustomersController extends BaseCustomersController {
$customers_query->where(function($customers_query) use($request, $q) { $customers_query->where(function($customers_query) use($request, $q) {
if ($request->search_by == 'all' || $request->search_by == 'email') { if ($request->search_by == 'all' || $request->search_by == 'email') {
$customers_query->where('emails.email', 'like', '%'.$q.'%'); $customers_query->where('emails.email', 'like', '%'.$q.'%');
}
if ($request->exclude_email) { if ($request->exclude_email) {
$customers_query->where('emails.email', '<>', $request->exclude_email); $customers_query->where('emails.email', '<>', $request->exclude_email);
} }