<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
erdaldemirci / laravel-geoip-log-cleaner example snippets
" // other geoip-log-cleaner": "1.*"
},
protected $commands = [
// other kernel commands
\ErdalDemirci\GeoIPLogCleaner\Command\LogClearCommand::class,
];
namespace YourNamespace;
// your code
use ErdalDemirci\GeoIPLogCleaner\Facades\Cleaner;
class YourClass
{
public function yourMethod()
{
Cleaner::doSomething();
}
}
$cleaner = Cleaner::rotate(14);
if ($cleaner->clear()) {
echo 'GeoIP Log files older than 14 days in default folder were cleared successfully.';
} else {
echo 'GeoIP Log files older than 14 days in default folder were cleared with errors.';
}
if ($cleaner->dir('path_to_logs')->clear()) {
echo 'GeoIP Log files older than 14 days in `path_to_logs` folder were cleared successfully.';
} else {
echo 'GeoIP Log files older than 14 days in `path_to_logs` folder were cleared with errors.';
}
if (Cleaner::dir('path_to_logs')->clear()) {
echo 'Log files in `path_to_logs` folder were cleared successfully.';
} else {
echo 'Log files in `path_to_logs` folder were cleared with errors.';
}
shell
$ php artisan geoiplog:clear --help
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.