mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 18:04:03 +00:00
refactor TenantDatabaseManagers
This commit is contained in:
parent
824292e6df
commit
d2e1ce0a1e
10 changed files with 52 additions and 126 deletions
|
|
@ -6,6 +6,7 @@ namespace Stancl\Tenancy\Database\TenantDatabaseManagers;
|
|||
|
||||
use Stancl\Tenancy\Database\Contracts\TenantDatabaseManager;
|
||||
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
||||
use Throwable;
|
||||
|
||||
class SQLiteDatabaseManager implements TenantDatabaseManager
|
||||
{
|
||||
|
|
@ -13,7 +14,7 @@ class SQLiteDatabaseManager implements TenantDatabaseManager
|
|||
{
|
||||
try {
|
||||
return file_put_contents(database_path($tenant->database()->getName()), '');
|
||||
} catch (\Throwable) {
|
||||
} catch (Throwable) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -22,7 +23,7 @@ class SQLiteDatabaseManager implements TenantDatabaseManager
|
|||
{
|
||||
try {
|
||||
return unlink(database_path($tenant->database()->getName()));
|
||||
} catch (\Throwable) {
|
||||
} catch (Throwable) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue