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_branch
- is_corporate_branch
- is_div_office
- is_dao_office
- is_rao_office
- is_crm_rm_office
- is_head_office