
Automatically Provide an Online Version of Mailables
Wagonwheel is a Laravel package by Sam Carré that provides an online version of your Laravel emails to users. It uses Laravel’s built-in signed URLs to create a URL for the online version, which is secured and makes it difficult to guess the URL.
It works by adding the SaveForOnlineViewing
trait to any of your mailables. The readme provides the following example of a mailable:
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Sammyjo20\Wagonwheel\Concerns\SaveForOnlineViewing;
class BookingConfirmed extends Mailable
{
use Queueable, SerializesModels, SaveForOnlineViewing;
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject('Booking Confirmed')
->markdown('emails.bookings.confirmed');
}
}
At the time of writing, you can customize the placement of the component in the email and the message expiry time that determines how long Wagonwheel should keep the online version. You can also publicize the package’s views if you need to customize the look and feel.
You can learn more about this package on GitHub.
Filed in: NewsNewsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.
Laravel Jobs

- Full Stack PHP (Mid-Level/Senior) Programmer
-
Remote
PhoneBurner - Software Developer
-
Remote, (US & Canada Only)
Patient Prism - Web Application Developer
-
Chicago Loop
Leading Real Estate Companies of the World - Multiple Laravel Developers (Part-Time)
-
Remote, USA Only
The Great Escape Room - Software Developer
-
Remote (US & Canada)
Alley
Laravel schedule:work Command, Valet Lite, and YouTube Q&A
In this episode of the Laravel News podcast, Jake and Michael discuss the new Laravel “schedule:work” Com…
Website down? SSL invalid? You should use PingPing to get instantly notified! (sponsor)
PingPing.io is the simplest uptime and SSL monitoring service in the world when your website is down or your certific…