1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 21:14:03 +00:00

vague first draft of v3. TenantModelTest is passing

This commit is contained in:
Samuel Štancl 2020-05-08 04:37:43 +02:00
parent c2c90ff755
commit bd9aad229b
56 changed files with 803 additions and 1366 deletions

View file

@ -0,0 +1,24 @@
<?php
namespace Stancl\Tenancy\Database\Models;
use Illuminate\Database\Eloquent\Model;
use Stancl\Tenancy\Events\DomainCreated;
use Stancl\Tenancy\Events\DomainDeleted;
use Stancl\Tenancy\Events\DomainSaved;
use Stancl\Tenancy\Events\DomainUpdated;
class Domain extends Model
{
public function tenant()
{
return $this->belongsTo(Tenant::class);
}
protected $dispatchEvents = [
'saved' => DomainSaved::class,
'created' => DomainCreated::class,
'updated' => DomainUpdated::class,
'deleted' => DomainDeleted::class,
];
}