From ddf64cc65317ad54fae1d744a4e231280af559bd Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 18 Jun 2015 18:13:01 +0100 Subject: [PATCH] Make sure we only return a response from the api if the user understands it --- app/Http/Routes/ApiRoutes.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Routes/ApiRoutes.php b/app/Http/Routes/ApiRoutes.php index a374755a..bca1cc7b 100644 --- a/app/Http/Routes/ApiRoutes.php +++ b/app/Http/Routes/ApiRoutes.php @@ -23,8 +23,9 @@ class ApiRoutes public function map(Registrar $router) { $router->group([ - 'namespace' => 'Api', - 'prefix' => 'api/v1', + 'namespace' => 'Api', + 'prefix' => 'api/v1', + 'middleware' => 'accept:application/json' ], function ($router) { // General $router->get('ping', 'GeneralController@ping');