Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MAIL_DRIVER=smtp
- MAIL_HOST=smtp.gmail.com
- MAIL_PORT=587
- MAIL_USERNAME=mygmail@gmail.com
- MAIL_PASSWORD=mypassword
- MAIL_ENCRYPTION=tls
- <?php
- namespace AppHttpControllersJobs;
- require app_path().'/../../../lib/vendor/autoload.php';
- include_once(app_path().'/../../../lib/utils.php');
- use SymfonyComponentHttpKernelExceptionHttpException;
- use IlluminateRoutingResponseFactory;
- use IlluminateDatabaseQueryBuilder;
- use IlluminateSupportFacadesInput;
- use AppHttpControllersController;
- use IlluminateSupportFacadesView;
- use AppModelsJobsJobExperience;
- use AppModelsJobsJobSalary;
- use AppModelsJobsJobTitle;
- use AppModelsJobsJobDetails;
- use AppModelsJobsJobApply;
- use AppModelsJobsModuleItems;
- use IlluminateHttpResponse;
- use IlluminateHttpRequest;
- use CarbonCarbon;
- use Validator;
- use Config;
- use File;
- use DB;
- use Mail;
- class AppJobsController extends Controller
- {
- public function jobApply(Request $request)
- {
- $JobApply = new JobApply;
- $JobApply->job_id = $request->job_id;
- $JobApply->attachment = $images[0];
- $JobApply->user_id = $this->user['uid'];
- if ($JobApply->save())
- {
- $jobDetails = JobDetails::find($request->job_id);
- $JobTitle = JobTitle::find($jobDetails->jobtitle_id);
- $content = array(
- 'JobTitle' => $JobTitle->title,
- 'CompanyName' => $jobDetails->company_name,
- 'postedDate' => date('d-m-Y', strtotime($jobDetails->created_at)),
- 'user' => 'App User'
- );
- $subject = 'Applying For '.$JobTitle->title;
- $toUser = $jobDetails->email_id;
- $pathToFile = $this->uploadlocation.'/'.$images[0];
- Mail::send('email.sendResumes', $content, function ($message) use ($pathToFile, $toUser, $subject)
- {
- $message->from('noreply@gmail.com', 'Job Appy');
- $message->subject($subject);
- $message->to($toUser);
- });
- }
- }
- }
- <div>
- I would like to apply for {{$JobTitle}} within your company {{$CompanyName}}, adversited in Thedal on {{$postedDate}}.<br><br>
- I believe this position would provide a great opportunity to further my chosen career. My willingness to work hard and build my skill base will make me a good candidate for the job.<br><br>
- I look forward to hearing from you at your convenience.<br><br>
- Thanks & Regards,<br><br>
- {{$user}}
- </div>
Add Comment
Please, Sign In to add comment