oc-resizer-plugin/console/ResizePurge.php

45 lines
811 B
PHP
Raw Normal View History

2019-09-17 23:14:29 +02:00
<?php namespace Aweos\Resizer\Console;
use Illuminate\Console\Command;
2021-09-09 19:18:41 +02:00
use Storage;
2019-09-17 23:14:29 +02:00
class ResizePurge extends Command
{
/**
* @var string The console command name.
*/
protected $name = 'resize:purge';
/**
* @var string The console command description.
*/
protected $description = 'Drops all resized images';
/**
* Execute the console command.
* @return void
*/
public function handle()
{
2021-09-09 19:18:41 +02:00
Storage::deleteDirectory('uploads/public/c');
2019-09-17 23:14:29 +02:00
}
/**
* Get the console command arguments.
* @return array
*/
protected function getArguments()
{
return [];
}
/**
* Get the console command options.
* @return array
*/
protected function getOptions()
{
return [];
}
}