/** * レコード作成処理 */ private function existRecord() { $analysis = $this->analysis->where('date', $this->date)->first(); if (empty($analysis)) { $analysis = $this->analysis->newInstance(); $analysis->date = $this->date; $analysis->save(); } }