GlobalUser.php 459 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Stancl\Tenancy\Contracts;
  6. use Stancl\Tenancy\Database\Concerns;
  7. class GlobalUser extends Model implements Contracts\Domain
  8. {
  9. use Concerns\CentralConnection;
  10. protected $table = 'global_users';
  11. use HasFactory;
  12. public function tenant()
  13. {
  14. return $this->belongsTo(config('tenancy.tenant_model'));
  15. }
  16. }