You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
306 B
16 lines
306 B
<?php
|
|
|
|
namespace App\Domains\System\Actions\Backup;
|
|
|
|
use App\Domains\System\Models\Backup;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
class DeleteBackup
|
|
{
|
|
public function execute(Backup $backup): void
|
|
{
|
|
Storage::disk($backup->disk)->delete($backup->path);
|
|
|
|
$backup->delete();
|
|
}
|
|
}
|
|
|