Search code examples
phplaravelswaggercode-documentation

Issue "Could not render n, see the console" in Swagger with Laravel 5.8


In laravel 5.8 my swagger documentation is displaying fine but when I enter execute then its coming with 'Could not render n, see the console.' error. enter image description here

composer.php

 "darkaonline/l5-swagger": "5.8.*"

what can be the reason? anyone please suggest. TIA


Solution

  • you can make it okey by passing the request through that functions.

     requestInterceptor: function(request) {
          request.headers['X-CSRF-TOKEN'] = '{{ csrf_token() }}';
          return request;
        }