use Illuminate\Notifications\Messages\MailMessage;Route::get('/mailable',function(){$invoice= App\Invoice::find(1);return(newMailMessage)->markdown('emails.invoice-paid', compact('invoice'));});
class InvoicePaid extends Notification
{
public function toMail(User $user)
{
return (new MailMessage)
->success()
->line('We've received your payment)
->when($user->isOnMonthlyPaymentPlan(), function (MailMessage $message) {
$message->action('Save 20% by paying yearly', route('account.billing'));
})
->line('Thank you for using Unlock.sh');
}
}