PHP code example of farayaz / laravel-spy
1. Go to this page and download the library: Download farayaz/laravel-spy 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/ */
farayaz / laravel-spy example snippets
Http::get('https://github.com/farayaz/laravel-spy/');
// app/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
$schedule->command('spy:clean')->daily();
}
bash
php artisan vendor:publish --provider="Farayaz\LaravelSpy\LaravelSpyServiceProvider"
bash
php artisan migrate
bash
# Clean logs based on your config
php artisan spy:clean
# Clean logs older than 30 days
php artisan spy:clean --days=30
# Clean logs matching URL pattern
php artisan spy:clean --days=1 --url=api/users