mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 12:34:18 +00:00
37 lines
766 B
PHP
37 lines
766 B
PHP
<?php
|
|
|
|
namespace App\Models\Exchange;
|
|
use App\Models\AbstractModel;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
|
|
/**
|
|
* Class Company
|
|
* @package App\Models
|
|
*
|
|
* @property \App\Models\Country country_id
|
|
* @property \App\Models\State state_id
|
|
* @property \App\Models\District district_id
|
|
* @property string postcode
|
|
* @property string street_one
|
|
* @property string street_two
|
|
* @property integer billing_type
|
|
*/
|
|
class Company extends AbstractModel
|
|
{
|
|
protected $connection = 'exchange_db';
|
|
|
|
protected $table = 'companies';
|
|
|
|
/**
|
|
* @return belongsToMany
|
|
*/
|
|
public function employees(): belongsToMany
|
|
{
|
|
return $this->belongsToMany(User::class, (new Employee())->getTable(), 'company_id','user_id');
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|