getConstellations() as $name => $constellation) { $existedConstellation = Constellation::where('name', $name)->whereDate('created_at', Carbon::today())->first(); if(!$existedConstellation) { $constellation = Constellation::create([ 'name' => $name, 'all' => $constellation['all'], 'all_desc' => $constellation['all_desc'], 'love' => $constellation['love'], 'love_desc' => $constellation['love_desc'], 'career' => $constellation['career'], 'career_desc' => $constellation['career_desc'], 'income' => $constellation['income'], 'income_desc' => $constellation['income_desc'], ]); Log::info("{$constellation->name} updated"); } } } }