Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Created Aug 1, 2021
Embed
What would you like to do?
<?php
use App\Mail\{
NewOrder, OrderRejected
};
use App\Models\Order;
use Illuminate\Support\Facades\Route;
Route::group(["prefix" => "preview-emails"], function () {
Route::get("/new-order", function () {
$order = Order::whereSuccess()->firstOrFail();
return new NewOrder($order);
});
Route::get("/order-rejected", function () {
$order = Order::whereRejected()->firstOrFail();
return new OrderRejected($order);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment