-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[11.x] MailMakeCommand: Add new
--view
option (#51411)
* MailMakeCommand: Add new --view option * MailMakeCommand: Add tests for new --view option * Update src/Illuminate/Foundation/Console/MailMakeCommand.php Co-authored-by: Mior Muhammad Zaki <[email protected]> * formatting --------- Co-authored-by: Taylor Otwell <[email protected]> Co-authored-by: Mior Muhammad Zaki <[email protected]>
- Loading branch information
1 parent
93658ff
commit 422d196
Showing
3 changed files
with
109 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use Illuminate\Bus\Queueable; | ||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
use Illuminate\Mail\Mailable; | ||
use Illuminate\Mail\Mailables\Content; | ||
use Illuminate\Mail\Mailables\Envelope; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class {{ class }} extends Mailable | ||
{ | ||
use Queueable, SerializesModels; | ||
|
||
/** | ||
* Create a new message instance. | ||
*/ | ||
public function __construct() | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the message envelope. | ||
*/ | ||
public function envelope(): Envelope | ||
{ | ||
return new Envelope( | ||
subject: '{{ subject }}', | ||
); | ||
} | ||
|
||
/** | ||
* Get the message content definition. | ||
*/ | ||
public function content(): Content | ||
{ | ||
return new Content( | ||
view: '{{ view }}', | ||
); | ||
} | ||
|
||
/** | ||
* Get the attachments for the message. | ||
* | ||
* @return array<int, \Illuminate\Mail\Mailables\Attachment> | ||
*/ | ||
public function attachments(): array | ||
{ | ||
return []; | ||
} | ||
} |
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