Files
pds/app/Console/Commands/LogClear.php
dhanabalan 2b3db1cde1
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / review (pull_request) Failing after 27s
Laravel Larastan / larastan (pull_request) Failing after 2m1s
Laravel Pint / pint (pull_request) Failing after 2m25s
feat: Add LogClear command to clear Laravel log files
2025-11-27 11:55:21 +05:30

32 lines
587 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class LogClear extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:log-clear';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
file_put_contents(storage_path('logs/laravel.log'), '');
$this->info('Laravel log cleared!');
}
}