parent
ea4c3f91b1
commit
c0c734f930
10 changed files with 126 additions and 47 deletions
@ -0,0 +1,55 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
namespace App\Http\Controllers; |
||||||
|
|
||||||
|
use App\Models\Recruitment; |
||||||
|
use Illuminate\Http\Request; |
||||||
|
|
||||||
|
class RecruitmentController extends Controller |
||||||
|
{ |
||||||
|
public function save_vacancy(Request $request){ |
||||||
|
$this->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.']); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
namespace App\Models; |
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||||
|
use Illuminate\Database\Eloquent\Model; |
||||||
|
|
||||||
|
class Recruitment extends Model |
||||||
|
{ |
||||||
|
use HasFactory; |
||||||
|
} |
After Width: | Height: | Size: 34 KiB |
@ -0,0 +1,24 @@ |
|||||||
|
|
||||||
|
<style> |
||||||
|
.main-column{ |
||||||
|
display:flex; |
||||||
|
width:100%; |
||||||
|
} |
||||||
|
.column-one{ |
||||||
|
width:50%; |
||||||
|
} |
||||||
|
</style> |
||||||
|
|
||||||
|
<h1>Recruitment Enquiry Details </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 recruitment details</h3> |
||||||
|
<b>Full Name:</b> {{ $full_name }}<br /><br /> |
||||||
|
<b>Email:</b> {{ $email }}<br /><br /> |
||||||
|
<b>Company Name:</b> {{$company}}<br /><br /> |
||||||
|
<b>No of position:</b> {{$no_of_position}}<br /><br /> |
||||||
|
<b>Enquiry:</b> {{ $enquiry }}<br /><br /> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
Loading…
Reference in new issue