⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
hospital.dev-unit.com
/
app
/
Models
/
View File Name :
MultiTenant.php
<?php namespace App\Models; use Stancl\Tenancy\Database\Models\Tenant as BaseTenant; use Stancl\Tenancy\Events\CreatingTenant; use Stancl\Tenancy\Events\DeletingTenant; use Stancl\Tenancy\Events\SavingTenant; use Stancl\Tenancy\Events\TenantDeleted; use Stancl\Tenancy\Events\TenantSaved; use Stancl\Tenancy\Events\TenantUpdated; use Stancl\Tenancy\Events\UpdatingTenant; /** * Class CustomTenant * * @property string $id * @property string $tenant_username * @property string $hospital_name * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @property array|null $data * * @method static \Stancl\Tenancy\Database\TenantCollection|static[] all($columns = ['*']) * @method static \Stancl\Tenancy\Database\TenantCollection|static[] get($columns = ['*']) * @method static \Illuminate\Database\Eloquent\Builder|MultiTenant newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|MultiTenant newQuery() * @method static \Illuminate\Database\Eloquent\Builder|MultiTenant query() * @method static \Illuminate\Database\Eloquent\Builder|MultiTenant whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|MultiTenant whereData($value) * @method static \Illuminate\Database\Eloquent\Builder|MultiTenant whereHospitalName($value) * @method static \Illuminate\Database\Eloquent\Builder|MultiTenant whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|MultiTenant whereTenantUsername($value) * @method static \Illuminate\Database\Eloquent\Builder|MultiTenant whereUpdatedAt($value) * * @mixin \Eloquent */ class MultiTenant extends BaseTenant { public static function getCustomColumns(): array { return [ 'id', 'tenant_username', 'hospital_name', ]; } protected $casts = [ 'data' => 'array', ]; protected $dispatchesEvents = [ 'saving' => SavingTenant::class, 'saved' => TenantSaved::class, 'creating' => CreatingTenant::class, // 'created' => TenantCreated::class, 'updating' => UpdatingTenant::class, 'updated' => TenantUpdated::class, 'deleting' => DeletingTenant::class, 'deleted' => TenantDeleted::class, ]; }