Giter Site home page Giter Site logo

qoraiche / laravel-mail-editor Goto Github PK

View Code? Open in Web Editor NEW
2.1K 50.0 249.0 2.88 MB

MailEclipse :zap: Laravel Mail Editor

License: Other

PHP 2.56% JavaScript 0.07% CSS 31.28% SCSS 0.28% Blade 65.81%
laravel-mail laravel laravel-package mail laravel-mailable hacktoberfest

laravel-mail-editor's Introduction

Laravel Mail Editor (Aka MailEclipse)



MailEclipse is a mailable editor package for your Laravel applications to create and manage mailables using a web UI. You can use this package to develop mailables without using the command line, and edit templates associated with mailables using a WYSIWYG editor, among other features.

WORK IN PROGRESS

Please note that this package is still under active development. We encourage everyone to try it and give feedback.

Features

  • Create mailables without using command line.
  • Preview/Edit all your mailables at a single place.
  • Templates (more than 20+ ready to use email templates).
  • WYSIWYG Email HTML/Markdown editor.
  • Suitable for laravel beginners.
  • Send Test mails
  • Testing mails with fake data

Requirements

Laravel Version Compatible version
9 Latest - v4.x
8 v3.x
5.6 -> 7 v2.x

Installation

Via Composer

composer require qoraiche/laravel-mail-editor

The package will automatically register itself.

Publish configuration file and public assets:

php artisan laravel-mail-editor:install

Documentation

!!NOTE!! Maileclipse website is currently down, please check this youtube video (from author) for usage:

https://www.youtube.com/watch?v=QFgEGNBY3FI&t=135s

Documentation for Maileclipse can be found on the Official website.

Community

You can reach us at:

Change log

Please see the changelog for more information on what has changed recently.

Security

If you discover any security related issues, please email author email [email protected] instead of using the issue tracker.

License

MIT license. Please see the license file for more information.

Screenshots

maileclipse-new-mailable

maileclipse-templates

maileclipse-templates-create

TODO

Contributions are welcome

  • Frontend enhancement (jquery to vue.js).
  • Add more email templates (HTML/Markdown).
  • Expand documentation pages.

Credits

Donate ❤️

If you benefit from and/or like using MailEclipse then please help drive the future development of the project by

Donors list:

  1. conschneider.de - (20,00 $) - Thank You! - 3 November 2020
  2. Emprovise - (20,00 $) - You did a great job on MailEclipse! Thank you for providing this to everyone for free. I look forward to watching your project grow! Thanks Again, James S. - 19 December 2019
  3. Idearia Web Agency - (40,00 €) - Keep up the good work! - 19 June 2019
  4. Snapt Systems Ltd - (100,00 $ USD) - Being used by one of our teams at Snapt! - 11 April 2019
  5. Corr Ex - (2,00 $ USD) - 28 March 2019
  6. WebArt Design - (10,00 $ USD) - Donation made with love by BuiltByPanda. com from Australia who support developers and their excellent work - 28 March 2019
  7. Flavius Borlovan (6,99 $ USD) - #teamcookie says HELLOO 🥳😉 Thanks for this really helpful Package (MailEclipse) bro. 😉💪🏽 - 12 March 2019
  8. Maik Kasper - (6,99 $ USD) - We {teamcookie:github. com/flavius-constantin} 💥 love to support good developers and their awesome work! 🌪🔥 - 13 March 2019

Sponsors

laravel-mail-editor's People

Contributors

4n70w4 avatar akiyamasm avatar codepotato avatar dependabot[bot] avatar drbyte avatar griffins avatar ivebe avatar jeffersonsimaogoncalves avatar laravel-shift avatar nicoorfi avatar oliverbj avatar phadaphunk avatar qoraiche avatar reecem avatar serderovsh avatar stylecibot avatar udyw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-mail-editor's Issues

Custom variables and loops

This is awesome package. Very simple and usful.

I am implementing it in one of my prejct but then I want to show the list of document links which will be dynamic.

I can see, I can use custom variables like { first_name } which is pretty simple text but what if I want to show dynamic image(s) or the list of some dynamic data like list of document links or any address or data of mutilple users? How can we achieve this?

[Feature Request] How to add subject?

Hi there! First of all great application you have built. Lots of potential.


name: Feature request
About: How to add subject


Is your feature request related to a problem? Please describe.

Currently I don't see a subject field that is available in a mailable objet

Describe the solution you'd like

Would like an editable field to insert the subject of the email

Describe alternatives you've considered

having them as hard coded variables in the mailable container

Additional context

was wondering if there is a branch with a version I can explore?

Raw HTML

Apologies if I've overlooked this feature, but it would be nice to be able to see the raw HTML rather than just the WYSIWYG version, I'd like to use this as a way for marketing to make minor changes to templates without having to go through version control and this looks like it would work great, but it seems like it's tied to using the templates. Is this something you would consider adding? I imagine it would be a case of adding the button to the tinyMCE toolbar?

Thanks!

Missing 1 type from the __constructor injection (array)

I've used this package a while ago, you've made some fixes but I am still running into one:

Argument 1 passed to App\Mail\ContactEmail::__construct() must be of the type array, string given
    use Queueable, SerializesModels;
 
    public $data;
 
    /**
     * Create a new message instance.
     *
     * @param array $data
     */
    public function __construct(array $data = [])
    {
        $this->data = $data;
    }

What an awesome package!

Thank you for developing such a great package, I'll try to contribute on some features in the next upcoming days
Also, regarding the docs you might consider using LaRecipe to write your docs

Change Database for setup

Hello @Qoraiche,

This package looks great. I did notice one issue. When it runs through each factory, it is creating and storing the items in the application's database and not a testing location like a sqlite DB or different database.

This might be what @kertul is referring to in #19.

Thank you,
Michael D.

adding auth middleware

When i add auth middleware after that if i am logged in and try to access the maileclipse then it redirects me to the dashboard instead of maileclpise url. On the other side if i am not logged in then it will redirect me to the login page which is expected behaviour

Trying to get property 'fullname' of non-object

I have seen that similar issues have been already submitted & resolved, but I was not able to find a clear explanation what I have to do in order to fix this issue. I have MailEclipse version 1.3 installed
There is a ProductCreated mailable & product-created.blade.php markdown template. In that template file I have the following line:

New product "{{ $product->title }}" was created by user: {{ $product->user->fullname }}

Mailable class:

class ProductCreated extends Mailable
{
    use Queueable, SerializesModels;
    /**
     * @var User
     */
    public $user;
    /**
     * @var Product
     */
    public $product;

    /**
     * Create a new message instance.
     *
     * @param User $user
     * @param Product $product
     */
    public function __construct(User $user, Product $product)
    {
        $this->user = $user;
        $this->product = $product;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->markdown('emails.product-created');
    }
}

Please assist. Thanks.

Error 419 with MarkDown Editor?

It happens because you are not sending CSRF Token
I fixed it adding it

headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},

To the AJAX call, so it looks like:

previewRender: function (plainText, preview) {
                        // return preview.innerHTML = 'sacas';
                        $.ajax({
                            method: "POST",
                            headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},

                            url: "{{ route('previewTemplateMarkdownView') }}",
                            data: {markdown: plainText, name: '{{ $template['slug'] }}'}

                        }).done(function (HtmledTemplate) {
                            preview.innerHTML = HtmledTemplate;
                        });

                        return '';
                    },

Unable to deploy, get forbidden on every route

I have deployed a development version on Heroku to share with my Team.
I am unable to access any of the Maileclipse routes. Get, 403 Forbidden.

I have uncommented environment settings

//'allowed_environments' => ['local', 'staging', 'testing', 'development'],

And I have Route Middleware set to

'middlewares' => [
        'web',
        'auth',
    ],

Otherwise this is a clean installation of Laravel 5.8 with standarad "make: Auth"
No other packages are installed.
It is working fine on localhost.
I can login/logout on the deployed version and I can access the default "home" route that I also added to the auth middleware.
Any ideas?

Unknown Column name field

@Qoraiche Thanks for this wonderful package, Is there a way to use a different table instead of the default users table, currently am not sure one can use the package without having users table, I tried it and I got unknown field name in users table. Thank you.

Views and custom data

Thank you for this excellent package. I installed it in a project using laravel 5.7 however when I do php artisan vendor:publish I don't have the views. But I absolutely need to customize them. Another problem is that the variables do not appear when I edit the template of an email.
Thank you in advance for your help.

[Constructor error] Fatal error when using package

First off; looks pretty awesome. I wanted to give it a run in my application (which has a lot of mailables), but straight away I get an error when I visit /maileclipse:

Too few arguments to function App\Mail\MailClass::__construct(), 0 passed in /Users/****/Workspace/****/vendor/qoraiche/laravel-mail-editor/src/mailEclipse.php on line 548 and at least 2 expected

The constructor of this class has 3 arguments available:

    public function __construct($var1,$var2, $var3 = null)
    {
      
    }

I would debug it myself and PR it if I had the time. Still thanks for such a great package 👍

Class 'string' not found

Thanks for a really neat package.

I am running 5.8 and it seems its not compatible with this version yet?

"Class 'string' not found"
qoraiche/laravel-mail-editor/src/mailEclipse.php644

it seems this would not work if we have non object parameters in an existing mailable constructor?

Trying to get property of non-object

Every mailable I have as different properties and params added to it, but I keep getting the above error:

public $property;
public $tenant;

  /**
     * @param $certs
     */
    public function __construct($property, $tenant)
    {
        $this->property = $property;
        $this->tenant   = $tenant;
    }
 
    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        $message = $this->markdown('emails.tenant.pack')->subject('Tenant Pack for ' . $this->property->address . ' is now ready');
        return $message;
    }

mailables_dir behaviour is broken, and please let us specify the views folder as well

I use a "modules" approach to all my laravel projects which means that all of my project-related code lives inside a "modules" folder in the base path

So I changed the mailables_dir to

'mailables_dir' => base_path('modules/myproject/src/Mail/'),

Unfortunately this doesn't work correctly. The only file that was sucesfully created in that folder is the templates.json

When I used the UI to add a new Mailable item, since it just runs the built-in artisan make:mail command it created the mailable php file inside app/Mail

But then your package does correctly look in the configured mailables_dir for mailables, so it ends up finding none. I had to move the generated file manually and changed the namespace accordingly

I've run into this issue before and found this package, which needed some modifications so I created a fork here that allows the use of all built-in "make" commands that can create files anywhere with the correct namespace https://github.com/vesper8/artisan-make-file-location/commits/master

Anyway this may be more than you're willing to add.. but I wanted to point out that without this the mailables_dir configuration does not really work.. at least, it doesn't work with creating the mailables in that configured folder. But it does work if you move the mailables to that folder manually

The other thing I wanted to request is the ability to configure where the templates are stored. I also want my templates to live under my modules folder.. specifically they would live here:

base_path('modules/myproject/resources/views/vendor/maileclispe/templates/'),

Of course for now I can just manually move them there, but I figured if you allow us to configure where the Mailables are loaded from you could also allow this

Big thanks for this package! I look forward to future improvements

Can't locate path for templates

Hi!

First of all, thanks for the wonderful package! So I'm following the installation instructions, and hit an error on the second step, right after I run this:

php artisan vendor:publish --provider="qoraiche\mailEclipse\mailEclipseServiceProvider"

I get the following error:
image

I checked the source code here in Github and it does indeed seems there's no templates folder in that path.

Novapackage

good stuff!

A laravel nova package would be great!

mail_dir config for multiples folders

I have a app laravel modulated. Each module contains your classes /Mails /Notifications etc. But i can't keep my workflow with mail eclipse because he know only one folder app_path('Mail/'). Is possible implements this for many folders ?

[Feature Request] add a 'send test email' to the UI

It would be very useful if you could add a button for each mailable, in the mailables view, where you can specify an email (or possibly a user id) and have a test sent to that email.

The preview is nice, but you really don't know for sure how an email is going to look until you send an actual test and preview it in Mailtrap or in your email client itself (Gmail for example)

This would be a nice convenience method that I would personally use

Route closure

LogicException : Unable to prepare route [maileclipse] for serialization. Uses Closure.

I think no further explanation is needed;)

Cannot see templates

Hi
I am installed this package and cannot see the templates in
[\vendor\qoraiche\laravel-mail-editor\resources\views\templates

It shows file just file .gitkeep

mail_editor

"Error: Request failed with status code 500" when updating template details

PR ref: #13

To reproduce:

  • create template
  • edit template details (title, description)
  • submit changes

UI error:
Error: Request failed with status code 500

XHR response message:
message | Method Illuminate\Support\Collection::add does not exist.

file qoraiche/mailEclipse/src/mailEclipse.php
line 125
class Illuminate\Support\Collection

Request failed with status code 500 -Update Templates

Not able to update Templates. shown error 500
Using homestead

[2019-03-28 15:50:19] local.ERROR: : failed to open stream: Protocol error {"exception":"[object] (ErrorException(code: 0): : failed to open stream: Protocol error at /home/vagrant/VM/Projects/Web/ding-web/vendor/qoraiche/laravel-mail-editor/src/mailEclipse.php:360)
[stacktrace]
#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, ': failed to ope...', '/home/vagrant/V...', 360, Array)
#1 /home/vagrant/VM/Projects/Web/ding-web/vendor/qoraiche/laravel-mail-editor/src/mailEclipse.php(360): file_put_contents('r\\x89\\xA9\\x95\\xEB^R\\xC7\\xAB>\\xBA\\x1F\\x8AW', '<!DOCTYPE html ...')
#2 /home/vagrant/VM/Projects/Web/ding-web/vendor/qoraiche/laravel-mail-editor/src/Http/Controllers/MailablesController.php(89): qoraiche\\mailEclipse\\mailEclipse::markdownedTemplateToView(true, '<!DOCTYPE html ...', 'r\\x89\\xA9\\x95\\xEB^R\\xC7\\xAB>\\xBA\\x1F\\x8AW', true)
#3 [internal function]: qoraiche\\mailEclipse\\Http\\Controllers\\MailablesController->parseTemplate(Object(Illuminate\\Http\\Request))
#4 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#5 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('parseTemplate', Array)
#6 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(qoraiche\\mailEclipse\\Http\\Controllers\\MailablesController), 'parseTemplate')
#7 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
#8 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Router.php(682): Illuminate\\Routing\\Route->run()
#9 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#10 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#11 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Router.php(684): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#12 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Router.php(659): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#13 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#14 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Router.php(614): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#15 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#16 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#17 /home/vagrant/VM/Projects/Web/ding-web/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#18 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#19 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#20 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#21 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#22 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#23 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#24 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#25 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#26 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#27 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#28 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#29 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#30 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#31 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#32 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#33 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#34 /home/vagrant/VM/Projects/Web/ding-web/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#35 /home/vagrant/VM/Projects/Web/ding-web/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#36 {main}
"} 

Uncaught SyntaxError: Invalid hexadecimal escape sequence

Hi there, thank u for this awesome package!

Creating template first time is hassle-free. After attaching mailable to the template, when I view the mailable, the editor is not working. In the console, I am getting this error:
Uncaught SyntaxError: Invalid hexadecimal escape sequence

Can you please help me?

Uncaught SyntaxError- Invalid hexadecimal escape sequence

crud templates and mailables return status 419 response

I have installed the package it work fine. Except on crud with axios return status response 419.
I have check csrf in axios setting and i found it all is normaly.
i don't know why he didn't arrived to the functions (crud).
any help please.
thank you.

Database storage for templates

Like the looks of this package so far! Great potential. :)

An idea that I just wanted to dump here.

It would be really cool if you could store the templates in the database and if this package never modified any files.

Using docker, source control (git) or most kinds of deploy kind of makes it a big no-no to change php-files (anything outside of the storage folder really).

Would that be possible?

class Faker\Factory not found

  • Laravel 5.8.28
  • "qoraiche/laravel-mail-editor": "^1.2"

I deployed a test installation on Heroku.
I moved all dev dependencies to required just to make sure they were all installed on the live site.
I am not able to load the maileclipse route,

Class Faker\Factory not found

I have reinstalled all the packages, dumped-autoload, cleared app cache, even rebuild the server.
This is a clean Laravel 5.8 installation. No other packages installed.
I can login/logout and access the home route which I also use the auth middleware.


(1/1) ErrorClass 'Faker\Factory' not found
--
in DatabaseServiceProvider.php line 78
at DatabaseServiceProvider->Illuminate\Database\{closure}(object(Application), array())in Container.php line 787
at Container->build(object(Closure))in Container.php line 667
at Container->resolve('Faker\\Generator', array())in Container.php line 615
at Container->make('Faker\\Generator', array())in Application.php line 767
at Application->make('Faker\\Generator')in DatabaseServiceProvider.php line 83
at DatabaseServiceProvider->Illuminate\Database\{closure}(object(Application), array())in Container.php line 787
at Container->build(object(Closure))in Container.php line 667
at Container->resolve('Illuminate\\Database\\Eloquent\\Factory', array())in Container.php line 615
at Container->make('Illuminate\\Database\\Eloquent\\Factory', array())in Application.php line 767
at Application->make('Illuminate\\Database\\Eloquent\\Factory', array())in helpers.php line 121
at app('Illuminate\\Database\\Eloquent\\Factory')in mailEclipse.php line 569
at mailEclipse::handleMailableViewDataArgs('App\\Mail\\WelcomeBookerEN')in mailEclipse.php line 724
at mailEclipse::buildMailable('App\\Mail\\WelcomeBookerEN')in mailEclipse.php line 497
at mailEclipse::mailablesList()in mailEclipse.php line 26
at mailEclipse::getMailables()in MailablesController.php line 27
at MailablesController->index()
at call_user_func_array(array(object(MailablesController), 'index'), array())in Controller.php line 54
--
at Controller->callAction('index', array())in ControllerDispatcher.php line 45
at ControllerDispatcher->dispatch(object(Route), object(MailablesController), 'index')in Route.php line 219

//...followed by routing ...

Could there be a design flaw in the way files are stored ?

Hi again,
The templates are stored in :
vendor/qoraiche/laravel-mail-editor/resources/views/templates/
where vendor/* is ignored in git => So the result of that is that all your dev and changes in the templates will not be taken in the testing nor production environment !
And also template data is stored in a data table which is also not taken in the git.
Why not create a Templates directory within the app/Mail directory and store it there ?

Trying to get property 'token' of non-object

i got error Trying to get property 'token' of non-object"
when i pass object though construct is there an alternative solution to solve this

`protected $token, $user_name;

public function __construct($user_activation)
{
$this->token = $user_activation->token;
$this->user_name = $user_activation->user->name;
}`

Trying to access array offset on value of type null

When I create a mailables project following the official website example, I will be prompted with an error when I open it:

image

View public sharing errors

Then I found that there were no from and replyTo keys in the $resource array of the blade template. When I changed the build method of the mail class, it seemed to be back to normal again

image

image

This is a new laravel project. I don't know what caused the error

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.