1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 18:04:03 +00:00

refactor TenantDatabaseManagers

This commit is contained in:
Samuel Štancl 2022-08-27 22:29:08 +02:00
parent 824292e6df
commit d2e1ce0a1e
10 changed files with 52 additions and 126 deletions

View file

@ -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;
}
}