Пример #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $projects = [];
     if ($this->argument('type') == "daily") {
         foreach (Claim::daily()->get() as $claim) {
             $projects[$claim->project_id][] = $claim;
         }
     }
     if ($this->argument('type') == "weekly") {
         foreach (Claim::weekly()->get() as $claim) {
             $projects[$claim->project_id][] = $claim;
         }
     }
     if ($this->argument('type') == "monthly") {
         foreach (Claim::monthly()->get() as $claim) {
             $projects[$claim->project_id][] = $claim;
         }
     }
     $this->drawTable($projects);
 }