public function storeJob(Request $request)
 {
     if (Auth::employer()->get()->verified_by == 0 || Auth::employer()->get()->enrollment_no == '') {
         return redirect()->back()->withInput()->with('message', Basehelper::getMessage('employer_not_active'));
     }
     $validator = Validator::make($data = $request->all(), PostedJob::$rules, PostedJob::$messages);
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator)->withInput()->with('message', 'Some fields has errors. Please correct it and then try again');
     }
     $data['created_by'] = Auth::employer()->get()->id;
     DB::beginTransaction();
     //Generate Job id
     $records = PostedJob::withTrashed()->count();
     $current_id = 1;
     if (!$records == 0) {
         $current_id = PostedJob::withTrashed()->orderBy('id', 'DESC')->first()->id + 1;
     }
     $job_id = 'EMPJOB' . str_pad($current_id, 6, '0', STR_PAD_LEFT);
     $data['emp_job_id'] = $job_id;
     $data['status'] = 1;
     //so that by default it gets activated
     $job = PostedJob::create($data);
     if (!$job) {
         DB::rollbackTransaction();
         return Redirect::back()->withInput()->with('message', 'Unable to process your request');
     }
     DB::commit();
     return Redirect::route($this->route . 'list_job')->with('message', 'New Job has been Posted!');
 }