for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Insense\LaravelTelescopePruning\Commands;
use Illuminate\Console\Command;
use Illuminate\Contracts\Foundation\Application;
use Insense\LaravelTelescopePruning\PruneEntries;
use Laravel\Telescope\Telescope;
class TrimCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'telescope:trim';
* The console command description.
protected $description = 'Trim entries from the Telescope database';
* Execute the console command.
* @param Illuminate\Contracts\Foundation\Application $app
Insense\LaravelTelescope...\Foundation\Application
Illuminate\Contracts\Foundation\Application
\
* @return void
public function handle(Application $app)
Telescope::withoutRecording(function () use($app) {
$numTrimmed = (new PruneEntries($app))->prune();
$this->info($numTrimmed . ' entries trimmed.');
});
}