diff --git a/app/Http/Controllers/Admin/ServiceSectionController.php b/app/Http/Controllers/Admin/ServiceSectionController.php
index a0fa251..96b96ac 100644
--- a/app/Http/Controllers/Admin/ServiceSectionController.php
+++ b/app/Http/Controllers/Admin/ServiceSectionController.php
@@ -205,11 +205,12 @@ class ServiceSectionController extends Controller
}
if($service_section->update()){
$points = $request->points;
+ $point_ids = $request->point_ids;
$point_descriptions = $request->point_descriptions ?? [];
$icons = $request->icons ?? [];
-
-
- if($points[0] != null){
+
+
+ if($points[0] != null && $point_ids != null){
foreach($request['point_ids'] as $key => $pid){
$service_section_point = new ServiceSectionPoint();
$service_section_point = $service_section_point->findorfail($pid);
@@ -231,7 +232,16 @@ class ServiceSectionController extends Controller
$service_section_point->point = $points[$key];
$service_section_point->update();
- }
+ }
+ }
+ else{
+ foreach($points as $key => $point){
+ $service_section_point = new ServiceSectionPoint();
+ $service_section_point->service_section_id = $service_section->id;
+ $service_section_point->point = $point;
+ $service_section_point->save();
+ }
+ }
// $service_point = $service_section->service_section_point();
// $service_point->delete();
// foreach($points as $key => $point){
@@ -254,7 +264,6 @@ class ServiceSectionController extends Controller
// $service_section_point->point = $point;
// $service_section_point->update();
// }
- }
Session::flash('success','Service Section has been successfully updated!');
return redirect('admin/services/'.$id.'/sections');
diff --git a/app/Http/Controllers/RecruitmentController.php b/app/Http/Controllers/RecruitmentController.php
index 9bb16ef..2aa1784 100644
--- a/app/Http/Controllers/RecruitmentController.php
+++ b/app/Http/Controllers/RecruitmentController.php
@@ -3,6 +3,8 @@
namespace App\Http\Controllers;
use App\Models\Recruitment;
+use App\Models\Applicant;
+use App\Models\User;
use Illuminate\Http\Request;
class RecruitmentController extends Controller
@@ -52,4 +54,64 @@ class RecruitmentController extends Controller
});
return redirect()->back()->with(['success' => 'Thank you! Your recruitment details have been recieved.']);
}
+
+ public function apply(Request $request){
+ $this->validate(\request(),[
+ 'full_name' => 'required',
+ 'phone' => 'required',
+ 'email' => 'required',
+ 'file' => 'required',
+ 'country' => 'required',
+ 'has_visa_permit' => 'required',
+ 'has_skill_assessed' => 'required',
+ 'entered_captcha_code' => 'required|same:displayed_captcha_code'
+ ]);
+ $recruitment = new Applicant();
+ $subject = 'Applicant Enquiry';
+
+ $recruitment->full_name = $request['full_name'];
+ $recruitment->country = $request['country'];
+ $recruitment->phone = $request['phone'];
+ $recruitment->email = $request['email'];
+ $recruitment->has_visa_permit = $request['has_visa_permit'];
+ $recruitment->has_skill_assessed = $request['has_skill_assessed'];
+ if($request->hasFile('file')){
+ $extension = \request()->file('file')->getClientOriginalExtension();
+ $image_folder_type = array_search('applicant',config('custom.image_folders')); //for image saved in folder
+ $count = rand(100,999);
+ $out_put_path = User::save_image(\request('file'),$extension,$count,$image_folder_type);
+
+ is_array($out_put_path) ? $recruitment->resume = $out_put_path[0] : $recruitment->resume = $out_put_path;
+ }
+
+ $recruitment->save();
+
+ dispatch(function() use ($subject, $recruitment) {
+ \Mail::send('applicant_mail', array(
+
+ 'full_name' => $recruitment->full_name,
+
+ 'email' => $recruitment->email,
+
+ 'phone' => $recruitment->phone,
+
+ 'country' => $recruitment->country,
+
+ 'work_permit' => $recruitment->has_visa_permit,
+
+ 'subject' =>$subject ,
+
+ 'tra_skill' =>$recruitment->has_skill_assessed ,
+
+ ), 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 details have been recieved.']);
+ }
}
diff --git a/database/migrations/2022_12_13_071803_create_applicants_table.php b/database/migrations/2022_12_13_071803_create_applicants_table.php
new file mode 100644
index 0000000..131fc15
--- /dev/null
+++ b/database/migrations/2022_12_13_071803_create_applicants_table.php
@@ -0,0 +1,38 @@
+id();
+ $table->string('full_name');
+ $table->string('phone');
+ $table->string('email');
+ $table->boolean('has_visa_permit');
+ $table->boolean('has_skill_assessed');
+ $table->string('resume');
+ $table->string('country');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('applicants');
+ }
+};
diff --git a/public/images/applicant/2022/12/13/11329155dab0bbeae2986370de90e173.docx b/public/images/applicant/2022/12/13/11329155dab0bbeae2986370de90e173.docx
new file mode 100644
index 0000000..f31e9ba
Binary files /dev/null and b/public/images/applicant/2022/12/13/11329155dab0bbeae2986370de90e173.docx differ
diff --git a/public/images/applicant/2022/12/13/400757bd557d4d66a88b26b2fe9f82e5.docx b/public/images/applicant/2022/12/13/400757bd557d4d66a88b26b2fe9f82e5.docx
new file mode 100644
index 0000000..f31e9ba
Binary files /dev/null and b/public/images/applicant/2022/12/13/400757bd557d4d66a88b26b2fe9f82e5.docx differ
diff --git a/public/images/applicant/2022/12/13/53b452ae2614c9df1dcbb6f41dbc9522.docx b/public/images/applicant/2022/12/13/53b452ae2614c9df1dcbb6f41dbc9522.docx
new file mode 100644
index 0000000..f31e9ba
Binary files /dev/null and b/public/images/applicant/2022/12/13/53b452ae2614c9df1dcbb6f41dbc9522.docx differ
diff --git a/public/images/applicant/2022/12/13/6744591b0b11be79fe29823574c95393.docx b/public/images/applicant/2022/12/13/6744591b0b11be79fe29823574c95393.docx
new file mode 100644
index 0000000..f31e9ba
Binary files /dev/null and b/public/images/applicant/2022/12/13/6744591b0b11be79fe29823574c95393.docx differ
diff --git a/public/images/applicant/2022/12/13/6ae488148f2c5e3f9c7a728e8c73cace.jpeg b/public/images/applicant/2022/12/13/6ae488148f2c5e3f9c7a728e8c73cace.jpeg
new file mode 100644
index 0000000..686aaa8
Binary files /dev/null and b/public/images/applicant/2022/12/13/6ae488148f2c5e3f9c7a728e8c73cace.jpeg differ
diff --git a/public/images/applicant/2022/12/13/a4cfe3e4cf5f4b4289f41997fd5961dc.docx b/public/images/applicant/2022/12/13/a4cfe3e4cf5f4b4289f41997fd5961dc.docx
new file mode 100644
index 0000000..f31e9ba
Binary files /dev/null and b/public/images/applicant/2022/12/13/a4cfe3e4cf5f4b4289f41997fd5961dc.docx differ
diff --git a/public/images/applicant/2022/12/13/ca810503e71682d9dabdddaf00ec5a8c.jpeg b/public/images/applicant/2022/12/13/ca810503e71682d9dabdddaf00ec5a8c.jpeg
new file mode 100644
index 0000000..686aaa8
Binary files /dev/null and b/public/images/applicant/2022/12/13/ca810503e71682d9dabdddaf00ec5a8c.jpeg differ
diff --git a/public/images/service/2022/12/12/74bac73aa8868da051c9b1b09825d276.svg b/public/images/service/2022/12/12/74bac73aa8868da051c9b1b09825d276.svg
deleted file mode 100644
index 0b4892a..0000000
--- a/public/images/service/2022/12/12/74bac73aa8868da051c9b1b09825d276.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/resources/views/admin/service_section/create.blade.php b/resources/views/admin/service_section/create.blade.php
index 1a961e7..55570e6 100644
--- a/resources/views/admin/service_section/create.blade.php
+++ b/resources/views/admin/service_section/create.blade.php
@@ -92,10 +92,6 @@
Section Points
- Description
-
- Icon
-
@@ -131,8 +127,6 @@
debugger;
var html = '
'+
' '+
- ' '+
- ' '+
' '+
'
';
$('#point_g_1').append(html);
diff --git a/resources/views/admin/service_section/edit.blade.php b/resources/views/admin/service_section/edit.blade.php
index a60672c..e51922c 100644
--- a/resources/views/admin/service_section/edit.blade.php
+++ b/resources/views/admin/service_section/edit.blade.php
@@ -118,6 +118,27 @@
+ @else
+
+
+
@endif
diff --git a/resources/views/am_chef.blade.php b/resources/views/am_chef.blade.php
index 4351c8b..ffd7c98 100644
--- a/resources/views/am_chef.blade.php
+++ b/resources/views/am_chef.blade.php
@@ -44,7 +44,7 @@
-
Phone
-
+
Passport Country
@@ -321,23 +321,23 @@
Do you have a visa permitting work in Australia?
-
+
Select Position
- Yes
- No
+ Yes
+ No
Have you completed a TRA skill assessment?
-
+
Select Position
- Yes
- No
+ Yes
+ No
- Submit your resume with cover note
-
+ Submit your resume with cover note
+
@php
$code = Str::random(5);
diff --git a/resources/views/applicant_mail.blade.php b/resources/views/applicant_mail.blade.php
new file mode 100644
index 0000000..fb48582
--- /dev/null
+++ b/resources/views/applicant_mail.blade.php
@@ -0,0 +1,25 @@
+
+
+
+
Enquiry from Applicant
+
+
+
+
Please, find out the applicant details
+ Full Name: {{ $full_name }}
+ Email: {{ $email }}
+ Phone: {{$phone}}
+ Passport Country: {{$country}}
+ Work Pemrit in Australia: {{ $work_permit == 1 ? 'Yes' : 'No' }}
+ TRA skill assessment: {{ $tra_skill == 1 ? 'Yes' : 'No' }}
+
+
+
diff --git a/resources/views/layout/app.blade.php b/resources/views/layout/app.blade.php
index 67cad32..8f9bafb 100644
--- a/resources/views/layout/app.blade.php
+++ b/resources/views/layout/app.blade.php
@@ -38,7 +38,7 @@
@endphp
@@ -182,12 +182,12 @@
navHeader.classList.add("header-scroll");
}
- if(window.scrollY==0 && location.pathname != '/news_detail'){
+ if(window.scrollY==0 && location.pathname != '/news/est-dolorem-deseruntf'){
navHeader.classList.remove("header-scroll");
}
}
- if(location.pathname === '/news/'){
+ if(location.pathname === '/news/est-dolorem-deseruntf'){
navHeader.classList.add("header-scroll");
}
diff --git a/resources/views/service_view.blade.php b/resources/views/service_view.blade.php
index fe4b6ee..098f909 100644
--- a/resources/views/service_view.blade.php
+++ b/resources/views/service_view.blade.php
@@ -23,10 +23,8 @@
{{$service_sections->first()->title}}
{{$service_sections->first()->description}}
- @foreach($service_sections->first()->service_section_point() as $service_section_point)
+ @foreach($service_sections->first()->service_section_point as $service_section_point)
{{$service_section_point->point}}
-
@endforeach
@@ -65,7 +63,7 @@
@foreach($third_service->service_section_point() as $section_point)
{{$section_point->point}}
- @endforeach
+ @endforeach
diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php
index 200f50f..9d419a5 100644
--- a/resources/views/welcome.blade.php
+++ b/resources/views/welcome.blade.php
@@ -156,7 +156,7 @@
diff --git a/routes/web.php b/routes/web.php
index 8c8f682..887e6c4 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -87,6 +87,7 @@ Route::get('/gallery', [HomeController::class, 'gallery']);
Route::get('/career', [HomeController::class, 'working_dice']);
Route::post('/career', [HomeController::class, 'save_career'])->name('career');
Route::post('recruitment', [RecruitmentController::class,'save_vacancy'])->name('recruitment.vacancy');
+Route::post('recruitment/apply', [RecruitmentController::class,'apply'])->name('recruitment.apply');
Route::get('/service/{slug}', [FrontendServiceController::class,'single_service']);
Route::get('/visa_service/{slug}', [FrontendServiceController::class,'single_visa_service']);