Code Monkey home page Code Monkey logo

mailcoach-custom-placeholder's People

Contributors

timmoh avatar

Stargazers

 avatar  avatar  avatar

Forkers

vardkin

mailcoach-custom-placeholder's Issues

Mailcoach 3.0+ middleware issue

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.

Expected Behavior

The mailcoachCustomPlaceholder macro should correctly resolve the respective middleware.

Current Behavior

The fatal error Illegal offset type in isset or empty occurs when trying to load the /mailcoach/email-lists/1/placeholders endpoint.

Possible Solution

If only web routes need to be resolved, change line 87 in MailcoachCustomPlaceholderServiceProvider.php to read:

Route::middleware(config('mailcoach.middleware.web'))

Steps to Reproduce

  1. Install Mailcoach 3.0+ as a standalone application
  2. Include this package and follow the installation steps.
  3. Create an email list in the application.
  4. navigate to /mailcoach/email-lists/1/placeholders

Possible Implementation

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.

Route [mailcoach.emailLists.placeholders] not defined.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.