예제 #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $jobs = $this->company->allJobPost();
     $match_count_date = date('Y-m-d');
     foreach ($jobs as $job) {
         $job_match_count = new CompanyJobMatch();
         $job_match_count->job_id = $job['id'];
         $job_match_count->match_count = $job['match_count'];
         $job_match_count->match_count_date = $match_count_date;
         $job_match_count->save();
     }
 }
예제 #2
0
 public function getDailyJobPostMatches($job_id)
 {
     $date_lists = $this->getDateLists($job_id);
     $dates = CompanyJobMatch::select('match_count_date as created_date', 'match_count as count')->where('job_id', '=', 3)->groupBy('created_date')->get()->toArray();
     return $this->processDates($date_lists, $dates);
 }