Change Route::get('/email') to Route::get('email')
Try wrapping your $data into an array:
$dd = Event::fire('email.send', array($data));
rags02 said:
Try wrapping your $data into an array:
$dd = Event::fire('email.send', array($data));
Please, could you provide and explaination to this behaviour? We could not figure it out on #laravel
Because the listener fires call_user_func_array() which needs an array for the arguments. In the OP code each array value would be seen as a separate argument rather than one arg for the listener (which was expected by the dd() call).
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community