Initial: Laravel 13 setup with multi-tenant schema
This commit is contained in:
commit
a78a50ef0c
69 changed files with 10805 additions and 0 deletions
9
app/Models/Tenant.php
Normal file
9
app/Models/Tenant.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
class Tenant extends Model {
|
||||
protected $fillable = ['name','slug','plan'];
|
||||
public function users(): HasMany { return $this->hasMany(User::class); }
|
||||
public function devices(): HasMany { return $this->hasMany(Device::class); }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue