Tenant.php 802 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Models;
  3. use Stancl\Tenancy\Database\Concerns\HasDatabase;
  4. use Stancl\Tenancy\Database\Concerns\HasDomains;
  5. use Stancl\Tenancy\Database\Models\Tenant as BaseTenant;
  6. use Stancl\Tenancy\Contracts\TenantWithDatabase;
  7. /**
  8. * @method __call(string $method, array $parameters)
  9. * @method __callStatic(string $method, array $parameters)
  10. */
  11. class Tenant extends BaseTenant implements TenantWithDatabase
  12. {
  13. use HasDatabase, HasDomains;
  14. protected $casts = [
  15. // 'tenancy_db_username' => 'encrypted',
  16. // 'tenancy_db_password' => 'encrypted',
  17. ];
  18. public static function getCustomColumns(): array
  19. {
  20. return [
  21. 'id',
  22. // 'tenancy_db_username' => 'encrypted',
  23. // 'tenancy_db_password' => 'encrypted',
  24. ];
  25. }
  26. }