There are multiple ways to debug your laravel applications. This tutorial will show you various solutions and the benefits of each. Starting off with the easiest!
dd stands for Dump and Die which means dump whatever you pass into the dd function and stop all script execution after this. You would use it like this:
This outputs your currently authenticated user model. Laravel even gives it nice formatting for free!
If you want to continue rendering the page you can use the dump method as that does not stop executing the script. You would use it like this:
We love packages here at package pages and we love to shout out a fellow package creator @barryvdh. The laravel debug bar is one of the standard ways to debug a laravel application.
Use it like this:
composer require barryvdh/laravel-debugbar --dev
After that, you should (once you reload your browser window) see a new bar at the bottom of the screen. Open it up and see all the new information you have. For us, the "Queries" tab is great as it shows the direct queries made to the database. This way you can see if any queries are slowing your page load down.