v.2.27
Fixed reports
This commit is contained in:
30
commands/GETClearCache.php
Normal file
30
commands/GETClearCache.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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',
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user