Files
exchange-2.0/app/Models/Company.php
T
CheeSiong 1fbdc795ff - Segment Company Relationship Service Class
- Update Standard Segment Constant Logic Class
- List Standard Segment Constant Logic Class
- List Standard Segment Logic Class
2020-11-13 14:15:34 +08:00

40 lines
822 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Company
* @package App\Models
* @version August 4, 2020, 4:36 am
*
* @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
{
use SoftDeletes;
protected $table = 'companies';
protected $dates = ['deleted_at'];
/**
* @return belongsToMany
*/
public function segment(): belongsToMany
{
return $this->belongsToMany(Segment::class, 'segment_company', 'company_id', 'segment_id');
}
}