mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 11:14:03 +00:00
* PHP 8 support, test workflow syntax * Try using a custom data structure in the workflow * Try using matrix include * Default PHP target * single include * fix composer package name * [WIP] Try using dev-master for valuestore * Update spatie/valuestore constraint to be stable
24 lines
507 B
PHP
24 lines
507 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Stancl\Tenancy\Concerns;
|
|
|
|
use Stancl\Tenancy\Contracts\TenantWithDatabase;
|
|
|
|
trait CreatesDatabaseUsers
|
|
{
|
|
public function createDatabase(TenantWithDatabase $tenant): bool
|
|
{
|
|
parent::createDatabase($tenant);
|
|
|
|
return $this->createUser($tenant->database());
|
|
}
|
|
|
|
public function deleteDatabase(TenantWithDatabase $tenant): bool
|
|
{
|
|
parent::deleteDatabase($tenant);
|
|
|
|
return $this->deleteUser($tenant->database());
|
|
}
|
|
}
|