1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 21:34:03 +00:00

Remove obsolete files, restructure

This commit is contained in:
Samuel Štancl 2020-05-21 15:54:35 +02:00
parent fbe43fbb04
commit 4f8d892481
20 changed files with 19 additions and 83 deletions

View file

@ -1,28 +0,0 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Traits;
use Stancl\Tenancy\Contracts\TenantWithDatabase;
trait CreatesDatabaseUsers
{
public function createDatabase(TenantWithDatabase $tenant): bool
{
return $this->database()->transaction(function () use ($tenant) {
parent::createDatabase($tenant);
return $this->createUser($tenant->database());
});
}
public function deleteDatabase(TenantWithDatabase $tenant): bool
{
return $this->database()->transaction(function () use ($tenant) {
parent::deleteDatabase($tenant);
return $this->deleteUser($tenant->database());
});
}
}