How could I send an email asynchronously or call the function. So that the process of sending the mail is not so slow.
I did the shipping process in the following way, but there is still time processing for the shipment
php artisan make:mail DemoMail
the view of the email:
public function build()
{
return $this->view('emails.demo');
}
method call for sending:
public function index()
{
$email = Auth::user()->email;
Mail::to($email)->send(new DemoMail());
return view('home');
}
How you can send the email to be faster or that the page is not blank when you process the shipment.