mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 12:34:01 +00:00
20 lines
420 B
PHP
20 lines
420 B
PHP
<?php
|
|
|
|
namespace App\Models\Exchange;
|
|
|
|
use App\Models\AbstractModel;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
|
|
class User extends AbstractModel {
|
|
|
|
protected $connection = 'exchange_db';
|
|
|
|
/**
|
|
* @return belongsToMany
|
|
*/
|
|
public function company(): belongsToMany
|
|
{
|
|
return $this->belongsToMany(Company::class, (new Employee())->getTable(), 'user_id', 'company_id');
|
|
}
|
|
}
|