/** * @param array $step */ public function internalStore(array $step) { $this->step = new Step(); if ($this->step->where('step_id', $step['date']->minute(0)->second(0)->format('YmdH'))->exists()) { } else { $this->setStep($step); $this->step->save(); } }