Преглед на файлове

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

Rick Sharp преди 8 години
родител
ревизия
e24a1a1f53
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  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