/** * 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); } } }
/** * 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); }
/** * Show the form for creating a new resource. * * @return Response */ public function create(Request $request) { if ($request['todate']) { $tdate = date("Y-m-d h:m:s", strtotime($request['todate'])); } else { $tdate = date("Y-m-d h:m:s"); } if ($request['fromdate']) { $fdate = date("Y-m-d h:m:s", strtotime($request['fromdate'])); } else { $fdate = date("Y-m-d h:m:s"); } if (Auth::user()->type == 1 && Auth::user()->loginas == 1) { $admin = count(Member::select('id')->where('type', 1)->whereBetween('created_at', [$fdate, $tdate])->get()); $employer = count(Member::select('id')->where('type', 2)->whereBetween('created_at', [$fdate, $tdate])->get()); $agent = count(Member::select('id')->where('type', 3)->whereBetween('created_at', [$fdate, $tdate])->get()); $adminblock = count(Member::select('id')->whereTypeAndStatus(1, 0)->whereBetween('created_at', [$fdate, $tdate])->get()); $employerblock = count(Member::select('id')->whereTypeAndStatus(2, 0)->whereBetween('created_at', [$fdate, $tdate])->get()); $agentblock = count(Member::select('id')->whereTypeAndStatus(3, 0)->whereBetween('created_at', [$fdate, $tdate])->get()); $resume = count(PersonalInformation::select('id')->whereBetween('created_at', [$fdate, $tdate])->get()); $resumerequest = count(PersonalInformation::select('id')->where('approved_by', '!=', 0)->whereBetween('created_at', [$fdate, $tdate])->get()); $resumeapproved = count(PersonalInformation::select('id')->where('approval_status', 1)->whereBetween('created_at', [$fdate, $tdate])->get()); $demand = count(Demand::select('id')->whereBetween('created_at', [$fdate, $tdate])->get()); return view('history.index')->with('admin', $admin)->with('employer', $employer)->with('agent', $agent)->with('adminblock', $adminblock)->with('employerblock', $employerblock)->with('agentblock', $agentblock)->with('resume', $resume)->with('resumerequest', $resumerequest)->with('resumeapproved', $resumeapproved)->with('demand', $demand); } else { if (Auth::user()->loginas == 2) { $resume = count(PersonalInformation::select('id')->whereBetween('created_at', [$fdate, $tdate])->get()); $resumerequest = count(EmployerApproval::select('apid')->whereEmpid(Auth::user()->id)->whereBetween('created_at', [$fdate, $tdate])->get()); $resumeapproved = count(PersonalInformation::select('id')->whereApproval_statusAndApproved_by(1, Auth::user()->id)->whereBetween('created_at', [$fdate, $tdate])->get()); $demand = count(Demand::select('id')->whereEid(Auth::user()->id)->whereBetween('created_at', [$fdate, $tdate])->get()); return view('history.index')->with('resume', $resume)->with('resumerequest', $resumerequest)->with('resumeapproved', $resumeapproved)->with('demand', $demand); } else { $resume = count(PersonalInformation::select('id')->where('agent_id', Auth::user()->id)->whereBetween('created_at', [$fdate, $tdate])->get()); $resumerequest = count(PersonalInformation::select('id')->where('agent_id', Auth::user()->id)->where('approved_by', '!=', 0)->whereBetween('created_at', [$fdate, $tdate])->get()); $resumeapproved = count(PersonalInformation::select('id')->where('agent_id', Auth::user()->id)->where('approval_status', 1)->whereBetween('created_at', [$fdate, $tdate])->get()); $demand = count(Demand::select('id')->whereBetween('created_at', [$fdate, $tdate])->get()); return view('history.index')->with('resume', $resume)->with('resumerequest', $resumerequest)->with('resumeapproved', $resumeapproved)->with('demand', $demand); } } }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show(Request $request, $id) { // return "hello"; if (Auth::user()->type == 1 && Auth::user()->loginas == 1) { 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(); } $resume = PersonalInformation::join('experienceinformation', 'personalinformation.id', '=', 'experienceinformation.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'] . '%')->whereIn('personalinformation.id', $skillsearch)->whereIn('personalinformation.id', $edusearch)->orderBy('personalinformation.id', 'desc')->paginate(20); $resume->setPath(''); return view('resume.index')->with('resume', $resume); } else { if (Auth::user()->type == 3 || Auth::user()->loginas == 3) { 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(); } $resume = PersonalInformation::join('experienceinformation', 'personalinformation.id', '=', 'experienceinformation.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'] . '%')->whereIn('personalinformation.id', $skillsearch)->whereIn('personalinformation.id', $edusearch)->where('personalinformation.agent_id', '=', Auth::user()->id)->orderBy('personalinformation.id', 'desc')->paginate(20); $resume->setPath(''); return view('resume.index')->with('resume', $resume); } } }