1. Go to this page and download the library: Download michaeljennings/snapshot 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/ */
Snapshot::capture();
public function __construct(Michaeljennings\Snapshot\Contracts\Snapshot $snapshot)
{
$this->snapshot = $snapshot;
}
// Require the composer autoload
ig = ore = new $config['store']['class']($config);
$renderer = new $config['renderer'];
$dispatcher = new \Michaeljennings\Snapshot\Dispatcher(new \League\Event\Emitter());
// Create the snapshot class
$snapshot = new Snapshot($store, $renderer, $dispatcher, $config);
$snapshot = new Snapshot($store, $renderer, $dispatcher, $config);
$snapshot->capture();
$snapshot->capture(['user_id' => 1]);
$snapshot->captureException($exception);
$snapshot->captureException($exception, 500, 'Internal Server Error', ['user_id' => 1]);