From 329f89e5067cf92838c5c5b2079b09ba3608d1da Mon Sep 17 00:00:00 2001 From: Meletis Flevarakis Date: Mon, 2 Aug 2021 19:55:49 +0300 Subject: [PATCH] Fixed conflict with Laravel Debugbar --- src/Http/Controllers/EventsController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Http/Controllers/EventsController.php b/src/Http/Controllers/EventsController.php index 8a6cae9..20d9f29 100644 --- a/src/Http/Controllers/EventsController.php +++ b/src/Http/Controllers/EventsController.php @@ -10,10 +10,9 @@ class EventsController public function index(Request $request) { $events = Event::filter($request->query()) - ->get(['id', 'title', 'start', 'end']) - ->toJson(); + ->get(['id', 'title', 'start', 'end']); - return response($events); + return response()->json($events); } public function store(Request $request) @@ -73,4 +72,4 @@ public function destroy(Request $request, $eventId) return response()->json(['error' => true]); } -} \ No newline at end of file +}