first()){ self::order_no(); }else{ return $order_no; } } public function user() { return $this->belongsTo(UserW::class,'user_id'); } public function address() { return $this->belongsTo(AddressW::class,'address_id')->withTrashed(); } public function order_cancel() { return $this->hasOne(OrderCancelW::class,'order_id'); } public function store() { return $this->hasOne(Store::class,'id','store_id'); } public function refund() { return $this->hasMany(OrderRefundW::class,'order_no','order_no'); } public function getAccountAttribute($value){ return round($value); } }