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

Get rid of tenant DB manager connection config

This commit is contained in:
Samuel Štancl 2020-05-21 14:47:29 +02:00
parent 2fedd5ce88
commit 15a7e52208
11 changed files with 58 additions and 41 deletions

View file

@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Relations\Pivot;
use Stancl\Tenancy\Contracts\SyncMaster;
use Stancl\Tenancy\Events\SyncedResourceChangedInForeignDatabase;
use Stancl\Tenancy\Events\SyncedResourceSaved;
use Stancl\Tenancy\Exceptions\ModelNotSyncMaster;
use Stancl\Tenancy\Exceptions\ModelNotSyncMasterException;
class UpdateSyncedResource extends QueueableListener
{
@ -31,7 +31,7 @@ class UpdateSyncedResource extends QueueableListener
{
if (! $centralModel instanceof SyncMaster) {
// If we're trying to use a tenant User model instead of the central User model, for example.
throw new ModelNotSyncMaster(get_class($centralModel));
throw new ModelNotSyncMasterException(get_class($centralModel));
}
/** @var SyncMaster|Model $centralModel */