1 | <?php |
||
2 | |||
3 | namespace App\Jobs\Tenant; |
||
4 | |||
5 | use App\Models\Company; |
||
6 | use App\Models\Tenant as Tenants; |
||
7 | use Illuminate\Bus\Queueable; |
||
8 | use Illuminate\Contracts\Queue\ShouldQueue; |
||
9 | use Illuminate\Foundation\Bus\Dispatchable; |
||
10 | use Illuminate\Queue\InteractsWithQueue; |
||
11 | use Illuminate\Queue\SerializesModels; |
||
12 | |||
13 | class CreateDBs implements ShouldQueue |
||
14 | { |
||
15 | use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
16 | |||
17 | /** |
||
18 | * Create a new job instance. |
||
19 | * |
||
20 | * @return void |
||
21 | */ |
||
22 | public function __construct(private readonly Company $tenant) |
||
23 | { |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Execute the job. |
||
28 | * |
||
29 | * @return void |
||
30 | */ |
||
31 | public function handle() |
||
32 | { |
||
33 | Tenants::create([ |
||
34 | 'id' => $this->tenant->id, |
||
35 | ]); |
||
36 | } |
||
37 | } |
||
38 |