diff --git a/app/Http/Controllers/Api/SuppliersController.php b/app/Http/Controllers/Api/SuppliersController.php index 672858a5a8..288b6b3c2d 100644 --- a/app/Http/Controllers/Api/SuppliersController.php +++ b/app/Http/Controllers/Api/SuppliersController.php @@ -155,7 +155,7 @@ class SuppliersController extends Controller ]); if ($request->has('search')) { - $suppliers = $suppliers->where('locations.name', 'LIKE', '%'.$request->get('search').'%'); + $suppliers = $suppliers->where('suppliers.name', 'LIKE', '%'.$request->get('search').'%'); } $suppliers = $suppliers->orderBy('name', 'ASC')->paginate(50);