JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrhasOne('App\Models\ContractType', 'id', 'type'); } public function files() { return $this->hasMany('App\Models\ContractAttechment', 'contract_id' , 'id'); } public function employee() { return $this->hasOne('App\Models\User', 'id', 'employee_name'); } public function comment() { return $this->hasMany('App\Models\ContractComment', 'contract_id', 'id'); } public function note() { return $this->hasMany('App\Models\ContractNote', 'contract_id', 'id'); } public function ContractAttechment() { return $this->belongsTo('App\Models\ContractAttechment', 'id', 'contract_id'); } public function ContractComment() { return $this->belongsTo('App\Models\ContractComment', 'id', 'contract_id'); } public function ContractNote() { return $this->belongsTo('App\Models\ContractNote', 'id', 'contract_id'); } public static function getContractSummary($contracts) { $total = 0; foreach($contracts as $contract) { $total += $contract->value; } return \Auth::user()->priceFormat($total); } public static function status() { $status = [ 'accept' => 'Accept', 'decline' => 'Decline', ]; return $status; } }