Kaynağa Gözat

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

Rick Sharp 8 yıl önce
ebeveyn
işleme
e24a1a1f53
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  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