Example #1
0
 public function run()
 {
     $dt_start = Carbon::now();
     $dt_end = Carbon::now();
     $dt_start->year(2014)->month(12)->day(8)->hour(9)->minute(0)->second(0);
     $dt_end->year(2014)->month(12)->day(8)->hour(9)->minute(30)->second(0);
     // Timmy
     Unavailable::create(array('user_id' => '2', 'start' => $dt_start, 'end' => $dt_end));
     $dt_start->year(2014)->month(12)->day(8)->hour(12)->minute(0)->second(0);
     $dt_end->year(2014)->month(12)->day(8)->hour(17)->minute(0)->second(0);
     // Timmy
     Unavailable::create(array('user_id' => '2', 'start' => $dt_start, 'end' => $dt_end));
     $dt_start->year(2014)->month(12)->day(1)->hour(8)->minute(0)->second(0);
     $dt_end->year(2014)->month(12)->day(1)->hour(9)->minute(30)->second(0);
     // Timmy
     Unavailable::create(array('user_id' => '2', 'start' => $dt_start, 'end' => $dt_end));
     $dt_start->year(2014)->month(12)->day(3)->hour(10)->minute(0)->second(0);
     $dt_end->year(2014)->month(12)->day(3)->hour(11)->minute(0)->second(0);
     // Chad
     Unavailable::create(array('user_id' => '3', 'start' => $dt_start, 'end' => $dt_end));
     $dt_start->year(2015)->month(1)->day(6)->hour(12)->minute(0)->second(0);
     $dt_end->year(2015)->month(1)->day(6)->hour(15)->minute(15)->second(0);
     // Chad
     Unavailable::create(array('user_id' => '3', 'start' => $dt_start, 'end' => $dt_end));
     $dt_start->year(2014)->month(12)->day(3)->hour(12)->minute(0)->second(0);
     $dt_end->year(2014)->month(12)->day(3)->hour(13)->minute(0)->second(0);
     // Chad
     Unavailable::create(array('user_id' => '3', 'start' => $dt_start, 'end' => $dt_end));
     $dt_start->year(2014)->month(12)->day(5)->hour(9)->minute(0)->second(0);
     $dt_end->year(2014)->month(12)->day(5)->hour(14)->minute(0)->second(0);
     // Chad
     Unavailable::create(array('user_id' => '3', 'start' => $dt_start, 'end' => $dt_end));
     $dt_start->year(2014)->month(12)->day(9)->hour(8)->minute(0)->second(0);
     $dt_end->year(2014)->month(12)->day(9)->hour(15)->minute(15)->second(0);
     // Chad
     Unavailable::create(array('user_id' => '3', 'start' => $dt_start, 'end' => $dt_end));
     $dt_start->year(2014)->month(12)->day(5)->hour(8)->minute(0)->second(0);
     $dt_end->year(2014)->month(12)->day(5)->hour(18)->minute(0)->second(0);
     // Big Meech
     Unavailable::create(array('user_id' => '5', 'start' => $dt_start, 'end' => $dt_end));
 }