From 17643c64a7ccb280459572491b8d7ec4ffaf78b1 Mon Sep 17 00:00:00 2001 From: Bhavin Gajjar Date: Wed, 27 May 2020 05:56:41 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Middleware/ApiHeaderInject.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Middleware/ApiHeaderInject.php b/src/Middleware/ApiHeaderInject.php index 3178399..5722f84 100644 --- a/src/Middleware/ApiHeaderInject.php +++ b/src/Middleware/ApiHeaderInject.php @@ -1,26 +1,27 @@ headers->add([ 'Accept'=>'application/json', - 'Content-Type'=>'application/json' + 'Content-Type'=>'application/json', ]); } - if(config('laravel-api-generator.allow_cross_origin')) { + if (config('laravel-api-generator.allow_cross_origin')) { $request->headers->add([ 'Access-Control-Allow-Origin' => '*', - 'Access-Control-Allow-Methods' => 'GET, POST, PUT, DELETE, OPTIONS' + 'Access-Control-Allow-Methods' => 'GET, POST, PUT, DELETE, OPTIONS', ]); } + return $next($request); } }