1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Models/CompanyUser.php
David Bomba 0faf91dd5d
Generated Datatable Action Menus (#2590)
* 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
2019-01-07 22:30:28 +11:00

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');
}
}