diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 823060f..19f92d9 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -42,7 +42,10 @@ class HomeController extends Controller $phone = Setting::where(['key' => 'phone','status' => '1'])->first(); $email = Setting::where(['key' => 'email','status' => '1'])->first(); $address = Setting::where(['key' => 'address','status' => '1'])->first(); - return view('welcome',compact('services','sliders','about_us','news_and_updates','testimonials','phone','email','address','partners')); + $visa_success = Setting::where(['slug' => 'visa-success','status' => '1'])->first(); + $visa_approved = Setting::where(['slug' => 'visa-approved','status' => '1'])->first(); + $partner_institution = Setting::where(['slug' => 'partner-institutions','status' => '1'])->first(); + return view('welcome',compact('services','sliders','about_us','news_and_updates','testimonials','phone','email','address','partners','visa_success','visa_approved','partner_institution')); } public function service(){ @@ -318,5 +321,10 @@ class HomeController extends Controller { return response()->json(['captcha_code'=> Str::random(5)]); } + + public function news(){ + $news = NewsAndUpdate::where('status',1)->get(); + return view('news.blade.php',compact('news')) + } } diff --git a/app/Http/Controllers/RecruitmentController.php b/app/Http/Controllers/RecruitmentController.php new file mode 100644 index 0000000..280cdfc --- /dev/null +++ b/app/Http/Controllers/RecruitmentController.php @@ -0,0 +1,55 @@ +validate(\request(),[ + 'full_name' => 'required', + 'company' => 'required', + 'email' => 'required', + 'no_of_position' => 'required', + 'entered_captcha_code' => 'required|same:displayed_captcha_code' + ]); + $recruitment = new Recruitment(); + $subject = 'Recruitment Enquiry'; + + $recruitment->full_name = $request['full_name']; + $recruitment->company = $request['company']; + $recruitment->email = $request['email']; + $recruitment->no_of_position = $request['no_of_position']; + $recruitment->enquiry = $request['enquiry']; + + $recruitment->save(); + + dispatch(function() use ($subject, $recruitment) { + \Mail::send('recruitment_mail', array( + + 'full_name' =>$recruitment['full_name'], + + 'email' =>$recruitment['email'], + + 'company' =>$recruitment['company'], + + 'enquiry' =>$recruitment['enquiry'], + + 'no_of_position' =>$recruitment['no_of_position'], + + 'subject' =>$subject , + + ), function($message) use ($subject){ + // $subject=($service!= '') ? 'Enquiry for '.$service : 'Contact/Feedback'; + $message->subject($subject); + // $message->to('info@agilityhomecare.com.au', 'AgilityHomeCare')->subject($subject); + $message->to('mahesh@extratechs.com.au', 'Extratech')->subject($subject); + + + }); + }); + return redirect()->back()->with(['success' => 'Thank you! Your recruitment details have been recieved.']); + } +} diff --git a/app/Models/Recruitment.php b/app/Models/Recruitment.php new file mode 100644 index 0000000..a28f82c --- /dev/null +++ b/app/Models/Recruitment.php @@ -0,0 +1,11 @@ +id(); $table->string('full_name'); $table->string('company'); - $table->string('address'); + $table->string('email'); $table->string('no_of_position'); - $table->text('enquiry'); + $table->text('enquiry')->nullable(); $table->timestamps(); }); } diff --git a/public/images/news_and_update/2022/12/09/0e900948c55abc91e473dac65ddde3df.jpeg b/public/images/news_and_update/2022/12/09/0e900948c55abc91e473dac65ddde3df.jpeg new file mode 100644 index 0000000..fdc7a80 Binary files /dev/null and b/public/images/news_and_update/2022/12/09/0e900948c55abc91e473dac65ddde3df.jpeg differ diff --git a/resources/views/admin/login.blade.php b/resources/views/admin/login.blade.php index 6f42a07..08fb388 100644 --- a/resources/views/admin/login.blade.php +++ b/resources/views/admin/login.blade.php @@ -4,7 +4,7 @@
-