timmoh / mailcoach-custom-placeholder Goto Github PK
View Code? Open in Web Editor NEWAddOn Spatie's awesome Mailcoach (https://mailcoach.app/): Use custom placeholder like ::foo:: invidual in every email List.
License: MIT License
AddOn Spatie's awesome Mailcoach (https://mailcoach.app/): Use custom placeholder like ::foo:: invidual in every email List.
License: MIT License
In Mailcoach 3.0+ an API was added. This changed the structure of the middleware
array in the config file config/mailcoach.php
(see this commit) .
Upon installation, mailcoach-custom-placeholder will throw the error Illegal offset type in isset or empty
caused by not being able to resolve the proper middleware from config(mailcoach.middelware)
in MailcoachCustomPlaceholderServiceProvider.php
line 87.
The mailcoachCustomPlaceholder
macro should correctly resolve the respective middleware.
The fatal error Illegal offset type in isset or empty
occurs when trying to load the /mailcoach/email-lists/1/placeholders
endpoint.
If only web routes need to be resolved, change line 87 in MailcoachCustomPlaceholderServiceProvider.php
to read:
Route::middleware(config('mailcoach.middleware.web'))
/mailcoach/email-lists/1/placeholders
The proposed solution above is only relevant if placeholders should not be available via the new Mailcoach API endpoints. I have not explored the API in much detail yet.
The above suggested change will probably be a breaking change to Mailcoach 2.+ compatibility. For this reason we should probably extract the logic for determining the Mailcoach middleware config into a new function.
Are routes being loaded automatically, or does something have to be run that I've missed?
Laravel 6
PHP 7.4
MailCoach v2 Package
It didn't help to fix the file name, but noticed your routes filename is: mailcoach-custom-palceholder.php
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.