Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 11 |
| MailHelpNeededCompleted | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 11 |
| __construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| build | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 9 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace Qmp\Laravel\Mail\Mail; |
| 4 | |
| 5 | use Qmp\Laravel\Help\Models\HelpNeeded; |
| 6 | use Illuminate\Bus\Queueable; |
| 7 | use Illuminate\Mail\Mailable; |
| 8 | use Illuminate\Queue\SerializesModels; |
| 9 | use Illuminate\Contracts\Queue\ShouldQueue; |
| 10 | |
| 11 | class MailHelpNeededCompleted extends Mailable |
| 12 | { |
| 13 | use Queueable, SerializesModels; |
| 14 | |
| 15 | protected $helpNeeded; |
| 16 | |
| 17 | /** |
| 18 | * Create a new message instance. |
| 19 | * |
| 20 | * @return void |
| 21 | */ |
| 22 | public function __construct(HelpNeeded $helpNeeded) |
| 23 | { |
| 24 | $this->helpNeeded = $helpNeeded; |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Build the message. |
| 29 | * |
| 30 | * @return $this |
| 31 | */ |
| 32 | public function build() |
| 33 | { |
| 34 | return $this->view('emails::help_needed_completed') |
| 35 | ->text('emails::help_needed_completed_plain') |
| 36 | ->subject(env('APP_NAME') . ' : ' . $this->helpNeeded->subject) |
| 37 | ->with([ |
| 38 | 'subject' => $this->helpNeeded->subject, |
| 39 | 'completed_by_name' => $this->helpNeeded->completedBy->name, |
| 40 | 'completed_by_email' => $this->helpNeeded->completedBy->email, |
| 41 | 'url' => $this->helpNeeded->url, |
| 42 | 'description' => $this->helpNeeded->description |
| 43 | ]); |
| 44 | } |
| 45 | } |