Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

DUC-ANH-LY's avatar

How to fix a bug

Hi guys , I'm newbie in web development and when my app have error in code, I don't know where error in my code. Is that contains some technique except dd()

0 likes
4 replies
tykus's avatar

tail the log while you're trying to visit the page / post the form that raises the error

tail -f storage/logs/laravel.log 

A stacktrace will be appended to the log whenever an exception/error occurs. You can post the last error message / stacktrace here once you have it

Alternatively, if you are in local environment, Laravel should render an error page with details of the problem.

1 like

Please or to participate in this conversation.