Laravel debugbar install

  • 13-01-2023
  • 509
  • Laravel 9
  • Haresh Chauhan

In this post I will show you how to query debug in the laravel app while your application is in the development model, installing a package using "barryvdh/laravel-debugbar" composer, using this package you can very simply see your core SQL query from the laravel eloquent execute queries, as good session, cookies, authentication, error log, etc...

Composer install "barryvdh/laravel-debugbar --dev", a simple installation process and also required little configuration, that you. then after you start your development server you will see at the bottom of the application debug bar different menu options.

Preview :


Step 1. Install Composer

First, we required a package with the help of composer, we will install composer using bellow provided command in our laravel application. this package is required for development debugger purposes only, if you are running your app in production mode don't install it.

composer require barryvdh/laravel-debugbar --dev

Laravel discovers the package itself auto-discover, so don't require to add manually servicer provider.

This debugger enables only when your .env file APP_DEBUG is true.

Step 2. Configuration

In case if you get undefine servicer provider, or not using auto-discover package, add manually in config/app.php

Open the app.php file and register this below provider in the provider's array attribute.

'providers' => [

Also, we will register the global namespace, therefor we will register the "Debugbar" facade inside the aliases array attribute in the config/app.php

After registering the global namespace in the "aliases" attribute we do not need to call every time with the full namespace "Debugbar" class.

'aliases' => [
    'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class,

After that we will publish the configuration file for the advanced configuration, we will run the below-provided command in the command prompt and public a default configuration file.

php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"

You can change the configuration file according to your requirement and make it custom as per your requirement.

We always thanks to you for reading our blogs.


Dharmesh Chauhan

(Swapinfoway Founder)

Hello Sir, We are brothers origin from Gujarat India, Fullstack developers working together since 2016. We have lots of skills in web development in different technologies here I mention PHP, Laravel, Javascript, Vuejs, Ajax, API, Payment Gateway Integration, Database, HTML5, CSS3, and Server Administration. So you need our service Please Contact Us


Haresh Chauhan


We Are Also Recommending You :