public function removeFromFeaturedJobs(Request $request)
 {
     $job = $request->get('data');
     if (!empty($job)) {
         $jobObj = \App\Job::find($job['id']);
         if (!empty($jobObj)) {
             $jobObj->featured_flag = 0;
             $jobObj->updated_at = $jobObj->created_at;
             $job_id = \App\Job::saveInstance($jobObj);
         }
     }
     return 'true';
 }
Beispiel #2
0
 public static function createJobRecord($data = null)
 {
     $job_id = null;
     if (!empty($data) && $data->key == config('monster.key')) {
         $jobObj = self::prepareJobRecord($data);
         if (is_object($jobObj)) {
             $job_id = Job::saveInstance($jobObj);
         } else {
             $job_id = $jobObj;
         }
     } else {
         ExportRecordFailure::create(['job_info' => json_encode($data), 'reason' => '[ data is missing ]', 'action' => '[ exiting process ]', 'calling_function' => __FUNCTION__]);
     }
     return $job_id;
 }