PHP code example of filisko / debugbar-redbean

1. Go to this page and download the library: Download filisko/debugbar-redbean 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/ */

    

filisko / debugbar-redbean example snippets


R::setup('mysql:host=hostname;dbname=db', 'username', 'password');
/*
Possible log modes:
-------------------
0 Log and write to STDOUT classic style (default)
1 Log only, class style
2 Log and write to STDOUT fancy style
3 Log only, fancy style (it works nicely with this one)
*/
R::debug(true, 3);

// ... your queries here ...

// Get RedBean's Logger
$logger = R::getLogger();
$debugbar = new \DebugBar\StandardDebugBar();
$debugbar->addCollector(new \Filisko\DebugBar\DataCollector\RedBeanCollector($logger));

\Filisko\DebugBar\DataCollector\RedBeanCollector::$showKeepCache = false; // That's all!