1. Go to this page and download the library: Download lsrur/inspector 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/ */
public function register()
{
// ...
if ($this->app->environment() == 'development') {
$this->app->register(\Lsrur\Inspector\InspectorServiceProvider::class);
}
// ...
}
public function render($request, Exception $exception)
{
\Inspector::renderException($exception); // <= THIS LINE
return parent::render($request, $exception);
}
//Using Facade
\Inspector::log(...);
\Inspector::info(...);
//Using the "inspector" helper function
inspector()->info(...);
inspector()->warning($myVar);
// "li" is an alias of "inspector"
li()->error(...);
li()->group('myGroup');
// "inspect" function makes an "Inspector::log($v)" for each passed argument
inspect($var1, $var2, $var3, ...);
// Dump and die using Laravel Inspector magic
idd();
idd($var1, $var2);
// Inside Blade
@li(cmd,param1,param2,...)
// samples
@li('log', 'My comment', $myVar)
@li(log, 'My comment', $myVar) //also works without command quotes
@li(group,"myGroup")
@li(endGroup)