Event::fire seems to return an array if you look at fire method here: https://github.com/laravel/framework/blob/master/src/Illuminate/Events/Dispatcher.php#L184. That could be part of the issue. I'm guessing this is because firing an event can return multiple things if the event has multiple listeners. You can always just pass the first element of the event response to the View::make() method. Give the following a try:
Event::listen('test', function () {
return 'hello';
});
$event = Event::fire('test');
return View::make($event[0]);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community