1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-16 10:14:04 +00:00
This commit is contained in:
Samuel Štancl 2019-02-08 20:16:40 +01:00 committed by GitHub
parent 3f650d887d
commit 15766a0037
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 230 additions and 102 deletions

View file

@ -1,38 +0,0 @@
<?php
namespace Stancl\Tenancy\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Stancl\Tenancy\Interfaces\DatabaseCreator;
class QueuedDatabaseCreator implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @param DatabaseCreator $databaseCreator
* @param string $databaseName
* @return void
*/
public function __construct(DatabaseCreator $databaseCreator, string $databaseName)
{
$this->databaseCreator = $databaseCreator;
$this->databaseName = $databaseName;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$this->databaseCreator->createDatabase($databaseName);
}
}