lundi 26 octobre 2015

Laravel 5 Mail Queue logging

This is my mail queue function in my Laravel app:

 public function sendTo($email, $subject, $fromEmail, $view, $data = [])
    {

        \Mail::queue($view, $data, function($message) use($email, $subject, $fromEmail,$data)
        {
            //dd($data);
            $message->from($fromEmail, 'joedoe@example.com');

            $res = $message->to($email)
                ->subject($subject);

        });
    }

When running artisan command php artisan queue:listen the event mailer@handleQueuedMessage is triggered in CLI, but how can I differentiate, different event name for different function?

Is there away I can custom name, my function so I can monitor which event is being processed at a time.

eg: mailer@handleQueuedMessageClient mailer@handleQueuedMessageAdmin

Thanks!!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire