applicant-form-and-emai

aplus#20
Mahesh Sharma 2 years ago
parent a5d87fdcf7
commit 55ee2f3c11
  1. 13
      app/Http/Controllers/Admin/ServiceSectionController.php
  2. 62
      app/Http/Controllers/RecruitmentController.php
  3. 38
      database/migrations/2022_12_13_071803_create_applicants_table.php
  4. BIN
      public/images/applicant/2022/12/13/11329155dab0bbeae2986370de90e173.docx
  5. BIN
      public/images/applicant/2022/12/13/400757bd557d4d66a88b26b2fe9f82e5.docx
  6. BIN
      public/images/applicant/2022/12/13/53b452ae2614c9df1dcbb6f41dbc9522.docx
  7. BIN
      public/images/applicant/2022/12/13/6744591b0b11be79fe29823574c95393.docx
  8. BIN
      public/images/applicant/2022/12/13/6ae488148f2c5e3f9c7a728e8c73cace.jpeg
  9. BIN
      public/images/applicant/2022/12/13/a4cfe3e4cf5f4b4289f41997fd5961dc.docx
  10. BIN
      public/images/applicant/2022/12/13/ca810503e71682d9dabdddaf00ec5a8c.jpeg
  11. 10
      public/images/service/2022/12/12/74bac73aa8868da051c9b1b09825d276.svg
  12. 6
      resources/views/admin/service_section/create.blade.php
  13. 21
      resources/views/admin/service_section/edit.blade.php
  14. 20
      resources/views/am_chef.blade.php
  15. 25
      resources/views/applicant_mail.blade.php
  16. 8
      resources/views/layout/app.blade.php
  17. 4
      resources/views/service_view.blade.php
  18. 5
      resources/views/welcome.blade.php
  19. 1
      routes/web.php

@ -205,11 +205,12 @@ class ServiceSectionController extends Controller
} }
if($service_section->update()){ if($service_section->update()){
$points = $request->points; $points = $request->points;
$point_ids = $request->point_ids;
$point_descriptions = $request->point_descriptions ?? []; $point_descriptions = $request->point_descriptions ?? [];
$icons = $request->icons ?? []; $icons = $request->icons ?? [];
if($points[0] != null){ if($points[0] != null && $point_ids != null){
foreach($request['point_ids'] as $key => $pid){ foreach($request['point_ids'] as $key => $pid){
$service_section_point = new ServiceSectionPoint(); $service_section_point = new ServiceSectionPoint();
$service_section_point = $service_section_point->findorfail($pid); $service_section_point = $service_section_point->findorfail($pid);
@ -231,6 +232,15 @@ class ServiceSectionController extends Controller
$service_section_point->point = $points[$key]; $service_section_point->point = $points[$key];
$service_section_point->update(); $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 = $service_section->service_section_point();
// $service_point->delete(); // $service_point->delete();
@ -254,7 +264,6 @@ class ServiceSectionController extends Controller
// $service_section_point->point = $point; // $service_section_point->point = $point;
// $service_section_point->update(); // $service_section_point->update();
// } // }
}
Session::flash('success','Service Section has been successfully updated!'); Session::flash('success','Service Section has been successfully updated!');
return redirect('admin/services/'.$id.'/sections'); return redirect('admin/services/'.$id.'/sections');

@ -3,6 +3,8 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Recruitment; use App\Models\Recruitment;
use App\Models\Applicant;
use App\Models\User;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class RecruitmentController extends Controller 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.']); 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.']);
}
} }

@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('applicants', function (Blueprint $table) {
$table->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');
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@ -1,10 +0,0 @@
<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="90" height="90" rx="4" fill="#262535"/>
<path d="M17.5 65.4248C17.6953 60.5412 18.3204 45.7194 19.2581 41.5C20.4301 36.2258 29.8065 35.6398 32.7366 39.742C35.6667 43.8441 34.8283 46.606 36.8387 47.9463C38.5968 49.1183 41.5269 49.1183 43.2849 49.1183C46.0757 49.1183 47.9362 50.5802 48.2334 52.0484C49.514 52.2438 52.3097 52.6344 53.2473 52.6344C54.4194 52.6344 55.0054 54.3925 53.2473 54.3925C50.9032 54.3925 48.3638 54.2004 47.3871 54.1044C46.5253 54.752 45.006 55.1433 42.6989 54.9785C39.7688 54.9785 35.7844 54.8224 32.7366 53.8065C30.9785 53.2205 28.6344 49.1183 28.0484 47.9463C27.4624 46.7742 25.7043 50.2904 28.0484 52.6344C30.3925 54.9785 32.7366 60.7366 32.7366 63.6667C32.7366 66.5968 22.5789 65.8154 17.5 65.4248Z" fill="#E54E2E"/>
<path d="M60.2796 42.0861C58.5215 43.2581 55.5914 45.0162 55.0054 47.3603L63.7957 50.8764C61.2563 54.1972 63.0376 60.7366 60.1075 64.8387C64.7957 66.0108 69.6792 65.2294 73 65.4248C72.6093 62.2993 70.5935 50.9936 69.6559 46.7742C68.4839 41.5001 62.0376 40.914 60.2796 42.0861Z" fill="#F0EFFD"/>
<path d="M50.9029 58.1505C49.7309 58.1505 46.2147 57.5645 42.6988 58.7366C41.1361 60.4946 39.1823 64.0107 48.5589 64.0107C59.1071 64.0107 58.523 62.8424 57.9379 61.6721L57.9352 61.6666C56.7633 59.3226 52.075 58.1505 50.9029 58.1505Z" fill="#F0EFFD"/>
<path d="M54.4196 49.1183C53.8338 50.2903 52.0755 53.2204 51.4895 54.3924C50.5941 56.1505 53.2475 56.7365 53.8336 56.1505C54.4196 55.5645 55.5916 52.0484 56.1776 50.8763C56.7634 49.1183 55.0053 47.9462 54.4196 49.1183Z" fill="#F0EFFD"/>
<path d="M57.935 50.8764C57.3493 52.0484 56.7631 54.3925 56.177 55.5645C55.2817 57.3226 58.7041 58.3804 59.2901 57.7943C59.8762 57.2083 61.0482 53.6922 61.6342 52.5201C62.22 50.7621 58.5208 49.7043 57.935 50.8764Z" fill="#F0EFFD"/>
<circle cx="30.9785" cy="26.0215" r="7.03226" fill="#E54E2E"/>
<circle cx="56.7634" cy="31.8817" r="7.03226" fill="#F0EFFD"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

@ -92,10 +92,6 @@
<label> Section Points</label><br> <label> Section Points</label><br>
<input type="text" class="point" name="points[]" placeholder="Point"> <br> <input type="text" class="point" name="points[]" placeholder="Point"> <br>
<!-- <button class="close-point" onclick="deletePoint(1)" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button> --> <!-- <button class="close-point" onclick="deletePoint(1)" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button> -->
<label>Description</label><br>
<textarea class="summernote_class" name="point_descriptions[]"> </textarea><br>
<label>Icon</label><br>
<input type="file" class="form-control" name="icons[]" placeholder="Point"> <br>
<button class="close-point" onclick="deletePoint(1)" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button> <button class="close-point" onclick="deletePoint(1)" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button>
</div> </div>
@ -131,8 +127,6 @@
debugger; debugger;
var html = '<div id="point'+point_count+'" class="point1">'+ var html = '<div id="point'+point_count+'" class="point1">'+
'<input type="text" class="point" name="points[]" placeholder="Point"> <br>'+ '<input type="text" class="point" name="points[]" placeholder="Point"> <br>'+
'<textarea class="summernote_class" name="point_descriptions[]"> </textarea> <br>'+
'<input type="file" class="form-control" name="icons[]" placeholder="Point"> <br>'+
'<button type="button" class="close-point" onclick="deletePoint('+point_count+')"><i class="fa fa-trash" aria-hidden="true"></i></button>'+ '<button type="button" class="close-point" onclick="deletePoint('+point_count+')"><i class="fa fa-trash" aria-hidden="true"></i></button>'+
'</div>'; '</div>';
$('#point_g_1').append(html); $('#point_g_1').append(html);

@ -118,6 +118,27 @@
</div> </div>
</div> </div>
</div> </div>
@else
<div class="row" id="point_dom">
<div class="col-md-6 rel-close" id="point_row_1">
<div class="dom-box">
<div class="add-points card">
<div class="form-group" id="point_g_1" >
<div id="point1" class="point1" >
<label> Section Points</label><br>
<input type="text" class="point" name="points[]" placeholder="Point"> <br>
<!-- <button class="close-point" onclick="deletePoint(1)" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button> -->
<button class="close-point" onclick="deletePoint(1)" type="button"><i class="fa fa-trash" aria-hidden="true"></i></button>
</div>
</div>
<button type="button" class="add-point-btn btn btn-green" onclick="getPoint(1)">Add Points</button>
</div>
</div>
</div>
</div>
@endif @endif
<div class="form-group row create-button"> <div class="form-group row create-button">

@ -44,7 +44,7 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="chef-hire-form"> <div class="chef-hire-form">
<form action="{{route('recruitment.vacancy')}}" method = "post"> <form action="{{route('recruitment.apply')}}" method = "post" enctype="multipart/form-data">
@csrf @csrf
@include('errors.error') @include('errors.error')
@include('success.success') @include('success.success')
@ -59,7 +59,7 @@
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="">Phone</label> <label for="">Phone</label>
<input type="text" class="form-control" placeholder="Your phone number" name="company" id=""> <input type="text" class="form-control" placeholder="Your phone number" name="phone" id="">
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="">Passport Country</label> <label for="">Passport Country</label>
@ -321,23 +321,23 @@
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="">Do you have a visa permitting work in Australia?</label> <label for="">Do you have a visa permitting work in Australia?</label>
<select class="form-select" name="" id=""> <select class="form-select" name="has_visa_permit" id="">
<option value="" hidden>Select Position</option> <option value="" hidden>Select Position</option>
<option value="" class="aplus-display-select">Yes</option> <option value="1" class="aplus-display-select">Yes</option>
<option value="" class="aplus-display-select">No</option> <option value="0" class="aplus-display-select">No</option>
</select> </select>
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="">Have you completed a TRA skill assessment?</label> <label for="">Have you completed a TRA skill assessment?</label>
<select class="form-select" name="" id=""> <select class="form-select" name="has_skill_assessed" id="">
<option value="" hidden>Select Position</option> <option value="" hidden>Select Position</option>
<option value="" class="aplus-display-select">Yes</option> <option value="1" class="aplus-display-select">Yes</option>
<option value="" class="aplus-display-select">No</option> <option value="0" class="aplus-display-select">No</option>
</select> </select>
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="">Submit your resume with cover note</label> <label for="fil">Submit your resume with cover note</label>
<input type="file" class="form-control" name="" id=""> <input type="file" class="form-control" name="file" id="file">
</div> </div>
@php @php
$code = Str::random(5); $code = Str::random(5);

@ -0,0 +1,25 @@
<style>
.main-column{
display:flex;
width:100%;
}
.column-one{
width:50%;
}
</style>
<h1>Enquiry from Applicant </h1>
<br />
<div class="main-column" style = "display:block; width:100%;">
<div class="column-one" style = "display:block; width:100%;">
<h3>Please, find out the applicant details</h3>
<b>Full Name:</b> {{ $full_name }}<br /><br />
<b>Email:</b> {{ $email }}<br /><br />
<b>Phone:</b> {{$phone}}<br /><br />
<b>Passport Country:</b>{{$country}}<br/><br/>
<b>Work Pemrit in Australia:</b> {{ $work_permit == 1 ? 'Yes' : 'No' }}<br /><br />
<b>TRA skill assessment:</b> {{ $tra_skill == 1 ? 'Yes' : 'No' }}<br /><br />
</div>
</div>

@ -38,7 +38,7 @@
@endphp @endphp
<header class="header" id="dice-nav-head"> <header class="header" id="dice-nav-head">
<a class="navbar-brand" id="navbar-brand" href="{{url('/')}}"> <a class="navbar-brand" id="navbar-brand" href="{{url('/')}}">
<img src="{{ App\Models\Setting::where('slug', 'logo')->first()->value ?? ''}}" class="img-fluid logo" alt=""> <img src="{{ url(App\Models\Setting::where('slug', 'logo')->first()->value ?? '')}}" class="img-fluid logo" alt="">
</a> </a>
<ul class="nav nav-inner navbar-list" id="navigation-links"> <ul class="nav nav-inner navbar-list" id="navigation-links">
<li class="nav-item"> <li class="nav-item">
@ -131,7 +131,7 @@
<ul> <ul>
<li><a href="/about">About us</a></li> <li><a href="/about">About us</a></li>
<li><a href="">Pathway Programme</a></li> <li><a href="">Pathway Programme</a></li>
<li><a href="/news">News</a></li> <li><a href="{{url('/news')}}">News</a></li>
<li><a href="/contact">Contact us</a></li> <li><a href="/contact">Contact us</a></li>
</ul> </ul>
</div> </div>
@ -182,12 +182,12 @@
navHeader.classList.add("header-scroll"); 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"); navHeader.classList.remove("header-scroll");
} }
} }
if(location.pathname === '/news/'){ if(location.pathname === '/news/est-dolorem-deseruntf'){
navHeader.classList.add("header-scroll"); navHeader.classList.add("header-scroll");
} }
</script> </script>

@ -23,10 +23,8 @@
<h3>{{$service_sections->first()->title}}</h3> <h3>{{$service_sections->first()->title}}</h3>
<p>{{$service_sections->first()->description}}</p> <p>{{$service_sections->first()->description}}</p>
<ul> <ul>
@foreach($service_sections->first()->service_section_point() as $service_section_point) @foreach($service_sections->first()->service_section_point as $service_section_point)
<li>{{$service_section_point->point}}</li> <li>{{$service_section_point->point}}</li>
<!-- <li>Voluptas, eveniet consectetur blanditiis ut dolor officiis porro omnis! Maiores atque esse vero numquam quod.</li>
<li>Laudantium aperiam, ipsa odio repellendus libero cumque.</li> -->
@endforeach @endforeach
</ul> </ul>
</div> </div>

@ -156,7 +156,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="featured-news"> <div class="featured-news">
<a href="/news_detail" href=""> <a href="{{url('news/'.$news_and_updates->first()->slug )}}">
<div class="featured-news-image"> <div class="featured-news-image">
<img src="{{url($news_and_updates->first()->image ?? '')}}" class="w-100" alt=""> <img src="{{url($news_and_updates->first()->image ?? '')}}" class="w-100" alt="">
</div> </div>
@ -174,7 +174,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="more-news"> <div class="more-news">
@foreach($news_and_updates->skip(1) as $news) @foreach($news_and_updates->skip(1) as $news)
<a href="/news_detail" class="more-news-box"> <a href="{{url('news/'.$news->slug )}}" class="more-news-box">
<div class="news-box-img"> <div class="news-box-img">
<img src="{{url($news->image)}}" class="w-100" alt=""> <img src="{{url($news->image)}}" class="w-100" alt="">
</div> </div>
@ -184,7 +184,6 @@
</div> </div>
</a> </a>
@endforeach @endforeach
</div> </div>
</div> </div>
</div> </div>

@ -87,6 +87,7 @@ Route::get('/gallery', [HomeController::class, 'gallery']);
Route::get('/career', [HomeController::class, 'working_dice']); Route::get('/career', [HomeController::class, 'working_dice']);
Route::post('/career', [HomeController::class, 'save_career'])->name('career'); Route::post('/career', [HomeController::class, 'save_career'])->name('career');
Route::post('recruitment', [RecruitmentController::class,'save_vacancy'])->name('recruitment.vacancy'); 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('/service/{slug}', [FrontendServiceController::class,'single_service']);
Route::get('/visa_service/{slug}', [FrontendServiceController::class,'single_visa_service']); Route::get('/visa_service/{slug}', [FrontendServiceController::class,'single_visa_service']);

Loading…
Cancel
Save