mercredi 14 octobre 2015

Undefined index cipher on mail from console in Lumen

I am using Lumen ( Laravel 5.1 underneath).

I have a simple code

.
.
. 
$this->info( 'sending email to: '. $user->full_name );

    Mail::send( 'reminders.attendance', ['user' => $user, 'thisRelation' => $thisRelation ], function ( $m ) use
                ($user) {
                    $m->to( $user->email, $user->full_name)->subject('EduStatus Attendance Reminder');
                });

I can confirm that there exists a view file. And the email is being triggered when the I put this code in the routes.php file and hit the url simply.

I am trying to make this an artisan command but when I use the same code in my command file it just says

[ErrorException]
  Undefined index: cipher

When I remove the mail line, it works just fine. Whatever I print out to the console works. Any idea?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire