PHP code example of digital-drifter / laravel-chrome-logger
1. Go to this page and download the library: Download digital-drifter/laravel-chrome-logger 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/ */
digital-drifter / laravel-chrome-logger example snippets
/**
* gets instance of this class
*
* @return ChromePhp
*/
public static function getInstance();
/**
* logs a variable to the console
*
* @param mixed $data,... unlimited OPTIONAL number of additional logs [...]
* @return void
*/
public static function log();
/**
* logs a warning to the console
*
* @param mixed $data,... unlimited OPTIONAL number of additional logs [...]
* @return void
*/
public static function warn();
/**
* logs an error to the console
*
* @param mixed $data,... unlimited OPTIONAL number of additional logs [...]
* @return void
*/
public static function error();
/**
* sends a group log
*
* @param string value
*/
public static function group();
/**
* sends an info log
*
* @param mixed $data,... unlimited OPTIONAL number of additional logs [...]
* @return void
*/
public static function info();
/**
* sends a collapsed group log
*
* @param string value
*/
public static function groupCollapsed();
/**
* ends a group log
*
* @param string value
*/
public static function groupEnd();
/**
* sends a table log
*
* @param string value
*/
public static function table();
/**
* adds a setting
*
* @param string key
* @param mixed value
* @return void
*/
public function addSetting($key, $value);
/**
* add ability to set multiple settings in one call
*
* @param array $settings
* @return void
*/
public function addSettings(array $settings);
/**
* gets a setting
*
* @param string key
* @return mixed
*/
public function getSetting($key);
use DigitalDrifter\LaravelChromeLogger\LaravelChromeLogger;
...
/**
* LaravelChromeLogger $logger
*/
protected $logger;
public function __construct(LaravelChromeLogger $logger)
{
$this->logger = $logger;
}
public function log(string $message)
{
LaravelChromeLogger::log($message);
}
public function log(string $level = "log", string $message)
{
console($level, $message);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.