Chrome issue for dd

Chrome issue for dd() of laravel in ajax response

If you ever run dd() in ajax call and got html content in preview tab then this post is for you. there is a chrome issue when you do dd() then you get html in preview tab.

It is weird behaviour that if you get 200 status code then it will not going to preview html. so code 500 status code is there for you , actually it is server error status code but who cares when it comes to debugging.

So lets create helper function:

Create helpers.php

Create helpers.php file on root folder of your project.

Autoload helpers.php

Provide file name in the autoload section of composer.json

And that’s it, you are good to go now. you can try like below code.

Leave a Comment