Files
admin-php-module/commands/GETClearCache.php
miroman-afk fb46c8e739 v.2.27
Fixed reports
2023-05-02 15:21:54 +03:00

30 lines
850 B
PHP

<?php
namespace App\Commands;
use App\Component\Models\Filesystem;
use App\Console\Commands\HRCCommand;
use App\Console\Commands\HRCCommandInterface;
class GETClearCache extends HRCCommand implements HRCCommandInterface
{
protected $signature = 'getclearcache';
const cacheFolder = CORE_PATH . '/../../Cache/';
public function command($input, $output = null)
{
$code = Filesystem::GetCode($input['token']);
if (isset($input['folder'])) {
Filesystem::ClearFolder(self::cacheFolder . $code . '/' . $input['folder']);
return [
'status' => 'success',
];
}
if (!isset($input['folder'])) {
Filesystem::ClearFolder(self::cacheFolder . $code . '/');
return [
'status' => 'success',
];
}
}
}