ORIENT/plugins/abwebdevelopers/imageresize/commands/ImageResizeClear.php

22 lines
491 B
PHP
Raw Permalink Normal View History

2021-04-08 12:38:39 +00:00
<?php
namespace ABWebDevelopers\ImageResize\Commands;
use ABWebDevelopers\ImageResize\Classes\Resizer;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
class ImageResizeClear extends Command
{
protected $name = 'imageresize:clear';
protected $description = 'Clear all resized images.';
public function handle()
{
$deleted = Resizer::clearFiles();
$this->info('Successfully deleted ' . $deleted . ' ' . Str::plural('file', $deleted));
}
}