mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-31 05:16:49 -04:00
40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Modules\JobPortalJob\Emails;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class ApplyJobSubmitEmail extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
protected $content;
|
|
protected $cv_file;
|
|
|
|
public function __construct($body, $cv_file)
|
|
{
|
|
$this->content = $body;
|
|
$this->cv_file = $cv_file;
|
|
}
|
|
|
|
public function build()
|
|
{
|
|
|
|
$subject = __('A candidate apply for your job');
|
|
if(!empty($this->cv_file->file_path) && file_exists(public_path().'/uploads/'.$this->cv_file->file_path)){
|
|
return $this->subject($subject)
|
|
->view('jobportaljob::emails.apply-job',['content' => $this->content])
|
|
->attach( public_path().'/uploads/'. $this->cv_file->file_path, [
|
|
'as' => $this->cv_file->file_name.'.'.$this->cv_file->file_extension,
|
|
'mime' => $this->cv_file->file_type,
|
|
]);
|
|
}else{
|
|
return $this->subject($subject)->view('jobportaljob::emails.apply-job',['content' => $this->content]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|