芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/design.pulsehost.co.uk/application/app/Models/Estimate.php
belongsTo('App\Models\User', 'bill_creatorid', 'id'); } /** * relatioship business rules: * - the Category can have many Estimates * - the Estimate belongs to one Category */ public function category() { return $this->belongsTo('App\Models\Category', 'bill_categoryid', 'category_id'); } /** * relatioship business rules: * - the Estimate belongs to one Client */ public function client() { return $this->belongsTo('App\Models\Client', 'bill_clientid', 'client_id'); } /** * relatioship business rules: * - the Estimate belongs to one Project */ public function project() { return $this->belongsTo('App\Models\Project', 'estimate_projectid', 'project_id'); } /** * relatioship business rules: * - the Estimate can have many Lineitems * - the Lineitem belongs to one Estimate * - other Lineitems can belong to other tables */ public function lineitems() { return $this->morphMany('App\Models\Lineitem', 'lineitemresource'); } /** * relatioship business rules: * - the Estimate can have many Tags * - the Tags belongs to one Estimate * - other tags can belong to other tables */ public function tags() { return $this->morphMany('App\Models\Tag', 'tagresource'); } /** */ public function taxes() { return $this->morphMany('App\Models\Tax', 'taxresource'); } /** * display format for estimate id - adding leading zeros & with any set prefix * e.g. INV-000001 */ public function getFormattedBillEstimateidAttribute() { return runtimeEstimateIdFormat($this->bill_estimateid); } /** * pre-formatted data * @return string */ public function getFormattedBillDateAttribute() { return runtimeDate($this->bill_date); } /** * pre-formatted data * @return string */ public function getFormattedBillExpiryDateAttribute() { return runtimeDate($this->bill_expiry_date); } }