/ learning

Using Mailables Markdown Laravel

Just to make it short this is just to make mailables markdown template, which has been useful to me.

php artisan make:mail CreateOrder --markdown=mail.orders.created

File app.mail.createOrder

public function __construct($content)
$this->content = $content;

public function build()
return $this->from('[email protected]')

File - views.mail.orders.created


@component('mail::button', ['url' => $content['url']])

Thank you,

{{ config('app.name') }}

File - app.Http.Controllers.any

use App\Mail\CreateOrder;
use Mail;

$content = [
'title'=> $args['booking_number'],
'body'=> 'Body',
'button' => 'Action Text',
'url' => url('anywhere')
$receiverAddress = '[email protected]';
Mail::to($receiverAddress)->send(new CreateOrder($content));