Change Permission & WIP Dashboard Client Portal
This commit is contained in:
14
app/Models/Corporate.php
Executable file → Normal file
14
app/Models/Corporate.php
Executable file → Normal file
@@ -30,7 +30,7 @@ class Corporate extends Model
|
||||
protected $appends = [
|
||||
'avatar_url',
|
||||
];
|
||||
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
@@ -73,8 +73,6 @@ class Corporate extends Model
|
||||
public function currentPolicy()
|
||||
{
|
||||
return $this->hasOne(CorporatePolicy::class)
|
||||
// ->where('start', '<=', now())
|
||||
// ->where('end', '>=', now())
|
||||
->where('active', true)
|
||||
->latestOfMany();
|
||||
}
|
||||
@@ -106,7 +104,10 @@ class Corporate extends Model
|
||||
]);
|
||||
}
|
||||
|
||||
// public function
|
||||
public function claims()
|
||||
{
|
||||
return $this->hasManyThrough(Claim::class, CorporateEmployee::class, 'corporate_id', 'member_id', 'id', 'member_id');
|
||||
}
|
||||
|
||||
public function importLogs()
|
||||
{
|
||||
@@ -123,11 +124,6 @@ class Corporate extends Model
|
||||
return $this->hasManyThrough(CorporateService::class, Service::class, 'corporate_id', 'service_code', 'id', 'service_code');
|
||||
}
|
||||
|
||||
// public function claims()
|
||||
// {
|
||||
// return $this->hasManyThrough()
|
||||
// }
|
||||
|
||||
public function corporateServices()
|
||||
{
|
||||
return $this->hasMany(CorporateService::class, 'corporate_id');
|
||||
|
||||
Reference in New Issue
Block a user