Debugging performance issues with Laravel Debugbar


This article assumes that you are aware of Laravel’s and architecture, and core laravel concepts like using Eloquent, Collections etc.

We will use Laravel Debugbar for measuring and improving common performance issues on Laravel.

Installing Laravel Debugbar

Install laravel debug bar as a dev dependency on your laravel project using this command:

composer require barryvdh/laravel-debugbar --dev

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

The Debugbar will be enabled when APP_DEBUG is true.

That's it for setting up the laravel debugbar, you will see a bar at the bottom of the webpages showing some insights of what is going on when the request was completed.