attributes['time_absolut'] = \Illuminate\Support\Carbon::createFromFormat('d.m.Y H:i:s', $value); } public function setTimeMinAttribute($value) { $this->attributes['time_min'] = \Illuminate\Support\Carbon::createFromFormat('d.m.Y H:i:s', $value); } public function setTimeMaxAttribute($value) { $this->attributes['time_max'] = \Illuminate\Support\Carbon::createFromFormat('d.m.Y H:i:s', $value); } /** * relationship to dataset * * */ public function dataset() { return $this->belongsTo(Dataset::class, 'dataset_id', 'id'); } }