コード例 #1
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create(Request $request)
 {
     // return $resumep;
     if (Auth::user()->type == 1 && Auth::user()->loginas == 1) {
         $resumep = PersonalInformation::join('experienceinformation', 'personalinformation.id', '=', 'experienceinformation.pid')->join('educationinformation', 'personalinformation.id', '=', 'educationinformation.pid')->where('personalinformation.country', 'LIKE', '%' . $request['country'] . '%')->where('personalinformation.fname', 'LIKE', '%' . $request['name'] . '%')->where('personalinformation.inumber', 'LIKE', '%' . $request['passportNo'] . '%')->where('personalinformation.age', 'LIKE', '%' . $request['age'] . '%')->where('personalinformation.height', 'LIKE', '%' . $request['height'] . '%')->where('experienceinformation.experience', 'LIKE', '%' . $request['experience'] . '%')->where('educationinformation.qualification', 'LIKE', '%' . $request['qualification'] . '%')->orderBy('personalinformation.id', 'desc')->paginate(20);
         return view('resume.index')->with('resumep', $resumep);
     } else {
         if (Auth::user()->type == 3 || Auth::user()->loginas == 3) {
             $resumep = PersonalInformation::join('experienceinformation', 'personalinformation.id', '=', 'experienceinformation.pid')->join('educationinformation', 'personalinformation.id', '=', 'educationinformation.pid')->where('personalinformation.country', 'LIKE', '%' . $request['country'] . '%')->where('personalinformation.fname', 'LIKE', '%' . $request['name'] . '%')->where('personalinformation.inumber', 'LIKE', '%' . $request['passportNo'] . '%')->where('personalinformation.age', 'LIKE', '%' . $request['age'] . '%')->where('personalinformation.height', 'LIKE', '%' . $request['height'] . '%')->where('experienceinformation.experience', 'LIKE', '%' . $request['experience'] . '%')->where('educationinformation.qualification', 'LIKE', '%' . $request['qualification'] . '%')->where('personalinformation.agent_id', '=', Auth::user()->id)->orderBy('personalinformation.id', 'desc')->paginate(20);
             return view('resume.index')->with('resumep', $resumep);
         } else {
             if ($request['skill']) {
                 $skillsearch = SkillsInformation::select('pid')->where('skills', $request['skill'])->get()->toArray();
             } else {
                 $skillsearch = PersonalInformation::select('id')->get()->toArray();
             }
             // return $skillsearch;
             $resumeSearch = PersonalInformation::join('experienceinformation', 'personalinformation.id', '=', 'experienceinformation.pid')->join('educationinformation', 'personalinformation.id', '=', 'educationinformation.pid')->join('privacyinformation', 'personalinformation.id', '=', 'privacyinformation.pid')->where('privacyinformation.privacy', '=', 1)->where('personalinformation.country', 'LIKE', '%' . $request['country'] . '%')->where('personalinformation.fname', 'LIKE', '%' . $request['name'] . '%')->where('personalinformation.inumber', 'LIKE', '%' . $request['passportNo'] . '%')->where('personalinformation.age', 'LIKE', '%' . $request['age'] . '%')->where('personalinformation.height', 'LIKE', '%' . $request['height'] . '%')->where('educationinformation.qualification', 'LIKE', '%' . $request['qualification'] . '%')->where('experienceinformation.experience', 'LIKE', '%' . $request['experience'] . '%')->whereIn('personalinformation.id', $skillsearch)->where(function ($cquery) {
                 $cquery->where('personalinformation.approval_status', '=', 0)->orwhereIn('personalinformation.approved_by', [1, Auth::user()->id]);
             })->orderBy('personalinformation.id', 'desc')->paginate(10);
             // $resumeSearch->setPath('resumeSearch');
             return view('employer.approval_index')->with('resump', $resumeSearch);
         }
     }
 }
コード例 #2
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create(Request $request)
 {
     if ($request['skill']) {
         $skillsearch = SkillsInformation::select('pid')->where('skills', $request['skill'])->get()->toArray();
     } else {
         $skillsearch = PersonalInformation::select('id')->get()->toArray();
     }
     if ($request['qualification']) {
         $edusearch = EducationalInformation::select('pid')->where('degree', $request['qualification'])->get()->toArray();
     } else {
         $edusearch = PersonalInformation::select('id')->get()->toArray();
     }
     // return $edusearch;
     $approval = PersonalInformation::join('experienceinformation', 'personalinformation.id', '=', 'experienceinformation.pid')->join('privacyinformation', 'personalinformation.id', '=', 'privacyinformation.pid')->where('privacyinformation.privacy', '=', 1)->where('personalinformation.country', 'LIKE', '%' . $request['country'] . '%')->where('personalinformation.fname', 'LIKE', '%' . $request['name'] . '%')->where('personalinformation.inumber', 'LIKE', '%' . $request['passportNo'] . '%')->where('personalinformation.age', 'LIKE', '%' . $request['age'] . '%')->where('personalinformation.height', 'LIKE', '%' . $request['height'] . '%')->where('experienceinformation.experience', 'LIKE', '%' . $request['experience'] . '%')->whereIn('personalinformation.id', $skillsearch)->whereIn('personalinformation.id', $edusearch)->where(function ($cquery) {
         $cquery->where('personalinformation.approval_status', '=', 0)->orwhereIn('personalinformation.approved_by', [-1, Auth::user()->id]);
     })->orderBy('personalinformation.id', 'desc')->paginate(20);
     $approval->setPath('');
     return view('employer.approval_index')->with('approval', $approval);
 }
コード例 #3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if ($id != 0) {
         $resumdel1 = PersonalInformation::where('id', $id)->delete();
         $resumdel2 = EducationalInformation::where('pid', $id)->delete();
         $resumdel3 = WorkInformation::where('pid', $id)->delete();
         $resumdel4 = Language::where('pid', $id)->delete();
         $resumdel5 = SkillsInformation::where('pid', $id)->delete();
         $resumdel = AdditionalInformation::where('pid', $id)->delete();
         $resumdel = UploadInformation::where('pid', $id)->delete();
         $resumdel = PrivacyInformation::where('pid', $id)->delete();
     } else {
         $deleteChecked = Input::get('resume');
         if ($deleteChecked) {
             foreach ($deleteChecked as $delete) {
                 $resumdel1 = PersonalInformation::where('id', $delete)->delete();
                 $resumdel2 = EducationalInformation::where('pid', $delete)->delete();
                 $resumdel3 = WorkInformation::where('pid', $delete)->delete();
                 $resumdel4 = Language::where('pid', $delete)->delete();
                 $resumdel5 = SkillsInformation::where('pid', $delete)->delete();
                 $resumdel = AdditionalInformation::where('pid', $delete)->delete();
                 $resumdel = UploadInformation::where('pid', $delete)->delete();
                 $resumdel = PrivacyInformation::where('pid', $delete)->delete();
             }
             Session::flash('message', 'Successfully deleted');
             $history = new History();
             $history->action_id = 0;
             $history->action = 'Resume deleted';
             $history->user = Auth::user()->name;
             $history->remark = 'Number of Resume deleted=' . count($deleteChecked);
             $history->save();
         } else {
             Session::flash('nrmessage', 'Resume are not Selected');
         }
     }
     return Redirect::to('resume');
 }
コード例 #4
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if ($id != 0) {
         $resumdel1 = PersonalInformation::where('id', $id)->delete();
         $resumdel2 = EducationalInformation::where('pid', $id)->delete();
         $resumdel3 = WorkInformation::where('pid', $id)->delete();
         $resumdel4 = Language::where('pid', $id)->delete();
         $resumdel5 = SkillsInformation::where('pid', $id)->delete();
         $resumdel = AdditionalInformation::where('pid', $id)->delete();
         $resumdel = UploadInformation::where('pid', $id)->delete();
         $resumdel = PrivacyInformation::where('pid', $id)->delete();
     } else {
         $deleteChecked = Input::get('resume');
         if ($deleteChecked) {
             foreach ($deleteChecked as $delete) {
                 $resumdel1 = PersonalInformation::where('id', $delete)->delete();
                 $resumdel2 = EducationalInformation::where('pid', $delete)->delete();
                 $resumdel3 = WorkInformation::where('pid', $delete)->delete();
                 $resumdel4 = Language::where('pid', $delete)->delete();
                 $resumdel5 = SkillsInformation::where('pid', $delete)->delete();
                 $resumdel = AdditionalInformation::where('pid', $delete)->delete();
                 $resumdel = UploadInformation::where('pid', $delete)->delete();
                 $resumdel = PrivacyInformation::where('pid', $delete)->delete();
             }
         }
     }
     Session::flash('message', 'Successfully deleted');
     return Redirect::to('resume');
 }
コード例 #5
0
 public function resume_preview($id)
 {
     $personal = PersonalInformation::where('id', $id)->first();
     $phd1 = DB::table('educationinformation')->where('pid', $id)->get();
     $experience = WorkInformation::where('pid', $personal->id)->first();
     $skills = SkillsInformation::where('pid', $personal->id)->get();
     $additional = AdditionalInformation::where('pid', $personal->id)->first();
     $language = Language::where('pid', $personal->id)->get();
     $upload = UploadInformation::where('pid', $personal->id)->first();
     $privacy = PrivacyInformation::where('pid', $personal->id)->first();
     return view('resume')->with('personal', $personal)->with('phd1', $phd1)->with('experience', $experience)->with('skills', $skills)->with('additional', $additional)->with('language', $language)->with('upload', $upload);
 }