• This repository has been archived on 07/Aug/2022
  • Stars
    star
    246
  • Rank 158,701 (Top 4 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 1 year 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
584
star
3

lasso

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

laravel-chunkable-jobs

📑 Split Laravel jobs into multiple separate job chunks
PHP
80
star
5

saloon-laravel

Laravel package for Sammyjo20/Saloon
PHP
32
star
6

laravel-veevalidate

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

saloon-docs

Documentation for Saloon
19
star
8

saloon-sdk-template

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

saloon-rate-limiter-plugin

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

pokeapi-sdk

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

package-template

Template repository for my PHP packages
PHP
5
star
12

saloon-cache-plugin

Official plugin for caching Saloon responses
PHP
3
star
13

saloon-v2-spotify-example

Example Spotify OAuth2 Integration with Saloon v2.
JavaScript
3
star
14

saloon-http-sender

Laravel HTTP Client Sender for Saloon v2
PHP
3
star
15

cloudflare-cache-buster

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

xml-to-array

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

saloon-spotify-example

Example Spotify OAuth2 Integration with Saloon.
JavaScript
2
star
18

saloon-fixture-sdk-example

Saloon example SDK that uses Fixtures
PHP
1
star
19

saloon-pagination-v2

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

laravel-haystack-docs

Documentation for Laravel Haystack
1
star