mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 00:14:04 +00:00
Merge branches 'storage-url-conflict-resolution' and 'master' of https://github.com/archtechx/tenancy into storage-url-conflict-resolution
This commit is contained in:
commit
99bb28a16b
3 changed files with 39 additions and 5 deletions
16
src/Listeners/DeleteTenantStorage.php
Normal file
16
src/Listeners/DeleteTenantStorage.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Listeners;
|
||||
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Stancl\Tenancy\Events\DeletingTenant;
|
||||
|
||||
class DeleteTenantStorage
|
||||
{
|
||||
public function handle(DeletingTenant $event): void
|
||||
{
|
||||
File::deleteDirectory($event->tenant->run(fn () => storage_path()));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue