timmoh/mailcoach-custom-placeholder

An opinionated Custom Placeholder on EmailLists & Campaign for the awesome Mailcoach from Spatie

v5 2022-02-08 21:08 UTC

This package is auto-updated.

Last update: 2024-05-09 02:08:51 UTC


README

Latest Version on Packagist Test Status Code Style Status Total Downloads

AddOn Spatie's awesome Mailcoach (https://mailcoach.app/): Use custom placeholder like ::foo:: invidual in every email List.

Version / Tagging

Tagging & Version goes along with mailcoach

  • Mailcoach v3 = Mailcoach Custom Placeholder (master/3.x)

Installation

You can install the package via composer:

composer require timmoh/mailcoach-custom-placeholder

Prepare Database:

Publish migrations & migrate.

php artisan vendor:publish --tag=mailcoach-custom-placeholder-migrations
php artisan migrate

Publish Resources:

All Resources:

php artisan vendor:publish --tag=mailcoach-custom-placeholder

Or Single:

php artisan vendor:publish --tag=mailcoach-custom-placeholder-views
php artisan vendor:publish --tag=mailcoach-custom-placeholder-config
php artisan vendor:publish --tag=mailcoach-custom-placeholder-lang

Add Route

File: App\Providers\RouteServiceProvider

public function map() {
...
Route::mailcoachCustomPlaceholder($webPrefix);
//or
Route::mailcoachCustomPlaceholder('mailcoach');
...
}

Usage

Add EmailListPlaceholderReplacer::class to config/mailcoach.php

'replacers' => [
     \Timmoh\MailcoachCustomPlaceholder\Support\Replacers\EmailListPlaceholderReplacer::class,
    ...
],

Extend Email List View: (emailLists/layouts/partials/afterLastTab.blade.php)

<x-mailcoach::navigation-group icon="far fa-cog" :title="__('Placeholder')">
    <x-mailcoach::navigation-item :href="route('mailcoach.emailLists.placeholders', $emailList)">
        {{ __('Custom') }}
    </x-mailcoach::navigation-item>
</x-mailcoach::navigation-group>

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email timo@doersching.net instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.