mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 03:34:04 +00:00
Synced resources - proof of concept
This commit is contained in:
parent
86a98b2bc8
commit
daae67c0f7
8 changed files with 393 additions and 0 deletions
22
src/Events/SyncedResourceSaved.php
Normal file
22
src/Events/SyncedResourceSaved.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Events;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Stancl\Tenancy\Contracts\Syncable;
|
||||
use Stancl\Tenancy\Contracts\Tenant;
|
||||
|
||||
class SyncedResourceSaved
|
||||
{
|
||||
/** @var Syncable|Model */
|
||||
public $model;
|
||||
|
||||
/** @var Tenant|Model|null */
|
||||
public $tenant;
|
||||
|
||||
public function __construct(Syncable $model, ?Tenant $tenant)
|
||||
{
|
||||
$this->model = $model;
|
||||
$this->tenant = $tenant;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue