Qoraiche / laravel-mail-editor

MailEclipse :zap: Laravel Mail Editor
Other
2.09k stars 259 forks source link

Is there any documentation on how to use it or is there only video of the demo? #167

Closed alexv96 closed 1 year ago

alexv96 commented 3 years ago

Or an example in git uploaded that I am interested in this library, because I already installed the library but I do not understand what comes out of the video so I would like to make an example similar to the video to test and see if it works for what I need. Because seeing it at a glance as it serves me but I can not understand where they leave the other templates in the video.

Or should I guide me and copy the same folders as resources to test it?

ReeceM commented 3 years ago

Hi there @alexv96

Thanks for the interest in the package, at the moment I am working on rebuilding the docs, as also noted in issue #153.

Overall I can share some points about what the package will do for you here and what is created.


Once you have installed the package, it will work in your dev environments. It will be available under the path localhost:8000/maileclipse/mailables after running php artisan serve

After you have that running and as the video shows creating a template and mailable, you then need to do one manual action of adding the linked view to the mailable class that is created.

So if you create a mailable from the UI and name it MyFirstMailable it will create the class app/Mail/MyFirstMailable.php

Then you will need to create a template, you can go to templates, create one, and when you have there is the side bar that shows the name of the file, copy that and return to the Mailable class.

Inside the function that has the name for the blade file, paste this name. This will link the template and the mailable class.

The templates reference information is stored in a JSON file in the main application directory of Laravel, this you should commit to git.

Then there is a set of views that will be created and have the html/markdown for the templates. This would be committed to git like normal.

Then the editing of those templates is done from the UI of MailEclipse.

I know this is a very brief description, but this is the usual workflow from memory and my miss something. Please let me know if something isn't clear

Qoraiche commented 1 year ago

duplicated. will be fixed in v5.