Appearance
Wovosoft\BkbOffices\Models\CrmRmOffice
| Title | Description |
|---|---|
| uses table | offices |
| Purpose | Distinguishes the CRM/Rm Offices from other Offices by office type crm-rm |
This model has relationship with Branch and DivisionalOffice which are defined by branches (hasMany) and divisionalOffice (belongsTo) methods.
Get Branches of a CRM/RM Office
$crmRmOffice = \Wovosoft\BkbOffices\Models\CrmRmOffice::first();
$crmRmOffice->branches; // returns branches of this crm/rm office
Get Divisional Office of a CRM/RM Office
$crmRmOffice = \Wovosoft\BkbOffices\Models\CrmRmOffice::first();
$crmRmOffice->divisionalOffice; //returns Divisional Office
N.B.: type is automatically initiated when creating/updating new CrmRmOffice instance.
Checking type
There are custom attributes to check the type of Office Type
is_branchis_corporate_branchis_div_officeis_dao_officeis_rao_officeis_crm_rm_officeis_head_office