From cc144c3e8587590ef7cd16b32a448c93d89651a9 Mon Sep 17 00:00:00 2001 From: "afiq.hamzah" Date: Wed, 10 Aug 2022 12:43:42 +0800 Subject: [PATCH] Add json wrapper to route's response so that it can be called via ajax --- app/Http/Controllers/CustomersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/CustomersController.php b/app/Http/Controllers/CustomersController.php index 5f7e35a..07169dd 100644 --- a/app/Http/Controllers/CustomersController.php +++ b/app/Http/Controllers/CustomersController.php @@ -115,7 +115,7 @@ class CustomersController extends Controller if(sizeof($customers_info) > 0) return $customers_info; else - return "no-data"; + return response(["no-data"], 200); } /**