-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from DevDavido/laravel-10
feat: Provide Laravel 10 support
- Loading branch information
Showing
8 changed files
with
147 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
namespace App\Mail; | ||
|
||
use Illuminate\Bus\Queueable; | ||
use Illuminate\Mail\Mailable; | ||
use Illuminate\Mail\Mailables\Content; | ||
use Illuminate\Mail\Mailables\Envelope; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class ExceptionOccurred extends Mailable | ||
{ | ||
use Queueable, SerializesModels; | ||
|
||
private array $content; | ||
|
||
/** | ||
* Create a new message instance. | ||
*/ | ||
public function __construct($content) | ||
{ | ||
$this->content = $content; | ||
} | ||
|
||
/** | ||
* Get the message envelope. | ||
*/ | ||
public function envelope(): Envelope | ||
{ | ||
$emailsTo = config('exceptions.emailExceptionsTo', false) ? | ||
str_getcsv(config('exceptions.emailExceptionsTo')) : | ||
null; | ||
$emailsCc = config('exceptions.emailExceptionCCto', false) ? | ||
str_getcsv(config('exceptions.emailExceptionCCto')) : | ||
null; | ||
$emailsBcc = config('exceptions.emailExceptionBCCto', false) ? | ||
str_getcsv(config('exceptions.emailExceptionBCCto')) : | ||
null; | ||
$fromSender = config('exceptions.emailExceptionFrom'); | ||
$subject = config('exceptions.emailExceptionSubject'); | ||
|
||
return new Envelope( | ||
from: $fromSender, | ||
to: $emailsTo, | ||
cc: $emailsCc, | ||
bcc: $emailsBcc, | ||
subject: $subject | ||
); | ||
} | ||
|
||
/** | ||
* Get the message content definition. | ||
*/ | ||
public function content(): Content | ||
{ | ||
$view = config('exceptions.emailExceptionView'); | ||
|
||
return new Content( | ||
view: $view, | ||
with: [ | ||
'content' => $this->content, | ||
] | ||
); | ||
} | ||
} |
Oops, something went wrong.