2018-11-02 21:54:46 +11:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
class CompanyUser extends BaseModel
|
|
|
|
|
{
|
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
|
|
|
|
|
|
public function account()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasOne(Account::class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
|
{
|
2019-01-07 22:30:28 +11:00
|
|
|
return $this->hasOne(User::class)->withPivot('permissions');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function company()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasOne(Company::class)->withPivot('permissions');
|
2018-11-02 21:54:46 +11:00
|
|
|
}
|
|
|
|
|
}
|