1

When an error occur in DEBUG mode on laravel 4.2, i got the error displayed but in full plain text (with the html code in it).

as you can see on this image

then i have to search every time for "stacktrace" on the page to see the error :

enter image description here

It should display errors like on this link bellow https://cdn.tutsplus.com/net/uploads/2013/06/whoops-laravel.png

I don't get it, i spent like 2 days trying to fix this but nothing works..

I just saw that the debug bar is not rendered too but it is in the html code as well.

When i create a view in App::error, i don't have problems, but this is not what i want, i would like the fancy display you saw on my previous link which is the one that laravel use by default in debug mode..

4
  • are you using blade template ? Commented Mar 10, 2016 at 12:07
  • is the extension of the view file is like filename.blade ? or u just using filename.php Commented Mar 10, 2016 at 13:05
  • there is no view file, if i make a view in the App::error, it will render my view but it will not use the "whoops" package, and if i don't make a view, whoops is used but not rendered well Commented Mar 10, 2016 at 13:08
  • make sure HTML service provide is install. find the below line in app.php in config folder. if it is there 'Illuminate\Html\HtmlServiceProvider', Commented Mar 10, 2016 at 15:15

1 Answer 1

1

okey so i posted on the GIT of Whoops, and i got the right answer to my problem..

i simply had to add

header('Content-Type: text/html');

So simple.. but yet i didn't thought of this

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.