Beispiel #1
0
 /**
  * Takes a Day and sets its date to the net empty Date.
  * @param  Day    $day [description]
  * @return [type]      [description]
  */
 public static function onNextEmptyDate()
 {
     $farthestDay = Day::getFarthestOutDay();
     $fdt = Carbon::parse($farthestDay->date);
     $fdt = $fdt->addDay();
     $newDay = Day::createDay($fdt);
     return $newDay;
 }
 public function run()
 {
     DB::table('days')->delete();
     $dt = Carbon::today()->subMonth(2);
     $startDay = Day::createDay($dt);
     for ($i = 0; $i < 700; $i++) {
         $this->day->onNextEmptyDate();
     }
 }