mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
0faf91dd5d
* Style Datatable * Component Actions * Harvest user permissions from Pivot table * Pad out permissions * Client actions * Fixes for travis * Client Datatables * Menu permissions * Tests for menu permissions * Action menu * Implement query builder filter * Flatten user permissions * Implement rendering of client action dropdowns * Generated Action Menus
24 lines
413 B
PHP
24 lines
413 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class CompanyUser extends BaseModel
|
|
{
|
|
protected $guarded = ['id'];
|
|
|
|
public function account()
|
|
{
|
|
return $this->hasOne(Account::class);
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->hasOne(User::class)->withPivot('permissions');
|
|
}
|
|
|
|
public function company()
|
|
{
|
|
return $this->hasOne(Company::class)->withPivot('permissions');
|
|
}
|
|
}
|