Laravel - Mail - Rendering Mailables

Sometimes you may wish to capture the HTML content of a mailable without sending it. To accomplish this, you may call the render method of the mailable. This method will return the evaluated HTML content of the mailable as a string:

    use App\Mail\InvoicePaid;
    use App\Models\Invoice;
    $invoice = Invoice::find(1);
    return (new InvoicePaid($invoice))->render();