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 @@ - DICE | Login + AplusAgency |Admin Login diff --git a/resources/views/need_chef.blade.php b/resources/views/need_chef.blade.php index 713f6cb..2de640d 100644 --- a/resources/views/need_chef.blade.php +++ b/resources/views/need_chef.blade.php @@ -38,6 +38,8 @@
@csrf + @include('errors.error') + @include('success.success')

Please fill-up the form

diff --git a/resources/views/recruitment_mail.blade.php b/resources/views/recruitment_mail.blade.php new file mode 100644 index 0000000..3d02bba --- /dev/null +++ b/resources/views/recruitment_mail.blade.php @@ -0,0 +1,24 @@ + + + +

Recruitment Enquiry Details

+
+
+
+

Please, find out the recruitment details

+ Full Name: {{ $full_name }}

+ Email: {{ $email }}

+ Company Name: {{$company}}

+ No of position: {{$no_of_position}}

+ Enquiry: {{ $enquiry }}

+
+
+ diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index cc9be3b..e0178a1 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -11,12 +11,14 @@ + @foreach($sliders as $slider) -
diff --git a/routes/web.php b/routes/web.php index 662b2a4..b128a02 100644 --- a/routes/web.php +++ b/routes/web.php @@ -6,7 +6,7 @@ use App\Http\Controllers\Admin\ServiceController; use App\Http\Controllers\Admin\AboutUsController; use App\Http\Controllers\ServiceController as FrontendServiceController; use App\Http\Controllers\Admin\ReferralController as ReferralAdminController; -use App\Http\Controllers\ReferralController; +use App\Http\Controllers\RecruitmentController; use App\Http\Controllers\Admin\ServiceSectionController; use App\Http\Controllers\Admin\AccomodationController; use App\Http\Controllers\Admin\ContactUsController;