Explorar o código

FIX: Fixed "PHP Fatal error: Method Illuminate\View\View::__toString() must not throw an exception" when using with Dingo API.

Rick Sharp %!s(int64=9) %!d(string=hai) anos
pai
achega
e24a1a1f53
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/resources/views/documentarian.blade.php

+ 4 - 0
src/resources/views/documentarian.blade.php

@@ -66,7 +66,11 @@ console.log(response);
 > Example response:
 
 ```json
+@if(is_object($parsedRoute['response']) || is_array($parsedRoute['response']))
+{!! json_encode($parsedRoute['response'], JSON_PRETTY_PRINT) !!}
+@else
 {!! json_encode(json_decode($parsedRoute['response']), JSON_PRETTY_PRINT) !!}
+@endif
 ```
 @endif