Closed jornwildenbeest closed 5 months ago
Hi @jornwildenbeest thank you for opening the issue.
I will have a look at this and revert back 👍
Hi @ReeceM, Another question about the templates.
Is it possible to link multiple templates to one mailable?
I have a situation where I use one mailable with different templates (but all same variables from the mailable). But i'd like to see the mailable variables when editing the templates. Right now this is only possible when editing the mailable and not the templates it self.
It looks like the error is from a deprecation of some internal method calls, but I think this was not on purpose. I'll have to look a little more as to what changed or why. Thank you for noticing it :100:
With regards the second question, I don't think the package was originally designed with that in mind. Although that does sound like a good addition to the package. May need to think how that would get interpreted by the package if there is an a 'go ahead' for it from Yassine.
Hey @jornwildenbeest,
Please could you try this fix before I tag it as a release :+1:
composer require qoraiche/laravel-mail-editor:dev-fix/route-errors
Hi @ReeceM, thanks for the reply. I will try it later today and let you know!
Thank you, feedback would be great
@ReeceM I can confirm it is working! Which is great.
Except when you are using variables within the template. It then shows a notices that you can't use variables in the template preview mode, which is fine, I can understand why but it would be a great feature to use the factory to load the variables like you do with the maillables.
But we do need the connection between template and mailable to get that to work i guess.
@jornwildenbeest I'm glad it is working then. Unfortunately there was a bit of regression and the new implementation was lost I think 🤦♂️
So loading the variables you are right with needing the mailable class to be able to link those properly.
But we do have a way to generate those details. I must just see if the reflection loader still works. It's the other part of the system that generates the fake variables when a type isn't defined in the mailable.
There could probably be basic support for simple variables, just not sure of any that would need to be looped over, can't always tell what a person is needing in that instance :)
@ReeceM Another idea might be to have the option to select a template when you are in the preview mode in mailable.
When you visit a mailable, the preview mode shows the template that is loaded through the build function in the mail class.
Maybe its a nice feature to have an select input field with all templates, and you can select which template you want to preview.
Describe the bug
Maybe I am missing someting, but I think the template preview is not working when you go and use the preview mode when editing a template directly (not going through a mailable). When I click the preview button it just shows a white black page in the text editor.
url: https://laravel.test/maileclipse/templates/edit/yourtemplate.
stacktrace:
Reproduction steps
Steps to reproduce the behavior:
Laravel Version:
v9.17.0
MailEclipse package version:
v4.0.3
Screenshots (if applicable)