1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-16 17:44:05 +00:00

vague first draft of v3. TenantModelTest is passing

This commit is contained in:
Samuel Štancl 2020-05-08 04:37:43 +02:00
parent c2c90ff755
commit bd9aad229b
56 changed files with 803 additions and 1366 deletions

View file

@ -1,40 +0,0 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Stancl\Tenancy\Contracts\TenantDatabaseManager;
use Stancl\Tenancy\Tenant;
class QueuedTenantDatabaseCreator implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/** @var TenantDatabaseManager */
protected $databaseManager;
/** @var Tenant */
protected $tenant;
public function __construct(TenantDatabaseManager $databaseManager, Tenant $tenant)
{
$this->databaseManager = $databaseManager;
$this->tenant = $tenant;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$this->databaseManager->createDatabase($this->tenant);
}
}