attributes['start_time']) { return Carbon::parse($this->attributes['start_time'])->format('H:i'); } } public function getEndTimeAttribute() { if ($this->attributes['end_time']) { $time = Carbon::parse($this->attributes['end_time'])->format('H:i'); if($time == '00:00'){ $time = '24:00'; } return $time; } } public function merchant() { return $this->hasOne(MerchantAccount::class, 'id', 'merchant_id'); } }