| 1 | <?php |
||
| 9 | class MessageSent extends Mailable |
||
| 10 | { |
||
| 11 | use Queueable, SerializesModels; |
||
| 12 | |||
| 13 | public $name; |
||
| 14 | public $email; |
||
| 15 | public $text; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Create a new message instance. |
||
| 19 | * |
||
| 20 | * @return void |
||
|
|
|||
| 21 | */ |
||
| 22 | public function __construct(string $name, string $email, string $text) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Build the message. |
||
| 31 | * |
||
| 32 | * @return $this |
||
| 33 | */ |
||
| 34 | public function build() |
||
| 40 | } |
||
| 41 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.