PHP code example of rocont / laravel-blade-debugbar

1. Go to this page and download the library: Download rocont/laravel-blade-debugbar library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rocont / laravel-blade-debugbar example snippets


return [

    // Group variables by Blade view name (e.g. "welcome → $title")
    'group_by_view' => false,

    // Additional variables to exclude (system variables are always excluded)
    'excluded_variables' => [],

    // How to handle View::share() variables: "mark", "hide", or "show"
    'shared_mode' => 'mark',

];
bash
php artisan vendor:publish --tag=blade-debugbar-config

$posts          → array (3) [...]
$title          → "Blog"
[shared] $user  → array ["id" => 1, "name" => "John"]

blog.index → $posts    → array (3) [...]
blog.index → $title    → "Blog"
layouts.app → [shared] $user → array ["id" => 1, "name" => "John"]