use EllipseSynergie\ApiResponse\Contracts\Response;
$posts = Post::all();
return $this->response->withCollection($posts, new PostTransformer);
Expected behaviour
Must return the post model data.
Actual behaviour
The api-response package class \EllipseSynergie\ApiResponse\Laravel\Middleware\ParseInclude::class is causing the error.
Specifically the handle methods returned response on line 41. return $next($next);
Change the return to return $next($request); then the query responds correctly.
Browser log
`Type error: Argument 1 passed to Barryvdh\Cors\CorsService::isCorsRequest() must be an instance of Symfony\Component\HttpFoundation\Request, instance of Closure given, called in /Users/waynegibson/Projects/spacecomx-ecosystem/firefly/vendor/barryvdh/laravel-cors/src/HandleCors.php on line 35`
Steps to reproduce
"barryvdh/laravel-cors": "^0.9.2
"ellipsesynergie/api-response": "^0.14.0"
bootstrap/app.php
file:use EllipseSynergie\ApiResponse\Contracts\Response;
Expected behaviour
Must return the post model data.
Actual behaviour
The api-response package class
\EllipseSynergie\ApiResponse\Laravel\Middleware\ParseInclude::class
is causing the error.Specifically the handle methods returned response on line 41.
return $next($next);
Change the return to
return $next($request);
then the query responds correctly.Browser log