mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 16:44:03 +00:00
Extract Link command logic into actions
This commit is contained in:
parent
fa783641f4
commit
2594b1960f
6 changed files with 182 additions and 110 deletions
|
|
@ -9,10 +9,8 @@ use Illuminate\Contracts\Queue\ShouldQueue;
|
|||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Stancl\Tenancy\Contracts\Tenant;
|
||||
use Stancl\Tenancy\Events\CreatingStorageSymlink;
|
||||
use Stancl\Tenancy\Events\StorageSymlinkCreated;
|
||||
use Stancl\Tenancy\CreateStorageSymlinksAction;
|
||||
|
||||
class CreateStorageSymlinks implements ShouldQueue
|
||||
{
|
||||
|
|
@ -37,12 +35,6 @@ class CreateStorageSymlinks implements ShouldQueue
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
event(new CreatingStorageSymlink($this->tenant));
|
||||
|
||||
Artisan::call('tenants:link', [
|
||||
'--tenants' => [$this->tenant->getTenantKey()],
|
||||
]);
|
||||
|
||||
event(new StorageSymlinkCreated($this->tenant));
|
||||
CreateStorageSymlinksAction::handle($this->tenant);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue