PHP code example of hunglv-fs / laravel5-telescope

1. Go to this page and download the library: Download hunglv-fs/laravel5-telescope 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/ */

    

hunglv-fs / laravel5-telescope example snippets


'providers' => [
    // ...
    'HungLv\Telescope\TelescopeServiceProvider',
],



\HungLv\Telescope\Telescope::auth(function ($request) {
    return in_array($request->user()->email, ['[email protected]']);
});

\HungLv\Telescope\Telescope::filter(function ($entry) {
    return $entry->type !== 'query' || $entry->hasTag('slow');
});

try {
    $this->import($row);
} catch (\Exception $e) {
    \HungLv\Telescope\Telescope::catchException($e, ['import', 'row:'.$row->id]);
}
bash
php artisan vendor:publish --provider="HungLv\Telescope\TelescopeServiceProvider"
php artisan migrate
bash
php artisan telescope:prune --hours=48   # put this on cron
php artisan telescope:clear              # delete everything
bash
php tests/smoke.php   # recording pipeline: batching, tags, N+1 detection, caps, backtrace, row shape
composer install && php tests/views.php   # compiles every view with the real Laravel 5.0 Blade compiler