• This repository has been archived on 07/Aug/2022
  • Stars
    star
    247
  • Rank 164,117 (Top 4 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

☸️ Offer an online version of your Laravel emails to users.

⚠️ 07/08/2022 This project has officially been abandoned

Thank you everyone for downloading Wagonwheel, however I am going to be formally abandoning the project.

Wagonwheel

This is was a collaborative project with Ryan Chandler. Please consider supporting him for the hard work he put into this package!

Help support the maintenance of this package by buying me a coffee.

Wagonwheel

Offer an online version of your Laravel emails to users.

Latest Stable Version Total Downloads License

  • Uses Laravel's built-in temporary signed URLs to create the URL for the online version. This means it's secured by your app's encryption key, as well as making it difficult to guess.

  • Highly customisable.

  • Easy to install.

  • Supports Laravel 8

Installation

  1. Install Wagonwheel using composer with the command below:
composer require sammyjo20/wagonwheel
  1. Publish the migrations
php artisan vendor:publish --tag=wagonwheel-migrations
  1. Run the migrations
php artisan migrate
  1. Add the "SaveForOnlineViewing" trait to any of your Mailables.
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');
    }
}

Configuration

If you would like to customise how Wagonwheel works. Run the following command to publish Wagonwheel's configuration file.

php artisan vendor:publish --tag=wagonwheel-config

component_placement - This configuration variable defines if the banner should be rendered at the start of the email content or at the end of the email content. The available values are start and end.

message_expires_in_days - This configuration variable defines how long Wagonwheel should keep the online version of an email in days. If you would like the online version of your emails to never expire, set this to 0. The default is 30 days.

Customisation

If you would like to customise how the banner looks inside the email, just publish Wagonwheel's views with the following command.

php artisan vendor:publish --tag=wagonwheel-views

Testing

Run all tests

composer test

Run a specific test

composer test-f [name of test method]

Thanks

  • Ryan Chandler (@ryangjchandler) helped out massively with some great code improvements and overall making Wagonwheel better!
  • Gareth Thompson (@cssgareth) helped out with coming up with a cool name!

More Repositories

1

Saloon

Build beautiful API integrations and SDKs with Saloon 🤠
PHP
1,518
star
2

laravel-haystack

⚡️ Supercharged job chains for Laravel
PHP
606
star
3

lasso

🐎 Lasso is a Laravel package created to make your deployments blazing fast.
PHP
341
star
4

ssh-php

The ridiculously simple starting point for building PHP SSH apps! 🔥
PHP
237
star
5

laravel-chunkable-jobs

📑 Split Laravel jobs into multiple separate job chunks
PHP
83
star
6

saloon-laravel

Laravel package for Sammyjo20/Saloon
PHP
32
star
7

laravel-veevalidate

JS package that will handle your Laravel errors and automatically inject them into a VeeValidate instance ✨
JavaScript
21
star
8

saloon-docs

Documentation for Saloon
20
star
9

saloon-sdk-template

💅 SDK template repository for building SDKs with Saloon v1
PHP
8
star
10

saloon-rate-limiter-plugin

Adds support for rate limiting in your Saloon integration or SDK
PHP
7
star
11

pokeapi-sdk

Example PHP SDK for Pokéapi built with Saloon v2
PHP
7
star
12

package-template

Template repository for my PHP packages
PHP
5
star
13

ssh-php-docker

Dockerfile for ssh-php
Go
4
star
14

saloon-v2-spotify-example

Example Spotify OAuth2 Integration with Saloon v2.
JavaScript
4
star
15

cloudflare-cache-buster

Automate the process of clearing your Cloudflare site's cache with this simple Laravel app.
PHP
4
star
16

saloon-cache-plugin

Official plugin for caching Saloon responses
PHP
3
star
17

saloon-http-sender

Laravel HTTP Client Sender for Saloon v2
PHP
3
star
18

xml-to-array

🔀 Convert an XML string into an easy to understand array
PHP
2
star
19

saloon-spotify-example

Example Spotify OAuth2 Integration with Saloon.
JavaScript
2
star
20

saloon-fixture-sdk-example

Saloon example SDK that uses Fixtures
PHP
1
star
21

saloon-pagination-v2

(Work in progress) New Pagination for Saloon v3
PHP
1
star
22

laravel-haystack-docs

Documentation for Laravel Haystack
1
star