When trying to use the view method on the response helper just like the docs state, like:
return response()->view('page', $data);
i get a fatal error
Fatal error: Call to undefined method Laravel\Lumen\Http\ResponseFactory::view()
It seems like the view method is simply missing in ResponseFactory.php.
FYI, you can do:
return response(view('page', $data));
Or, in that example, simply:
return view('page', $data);
I think the docs need to be updated. They specifically show the response()->view() method: http://lumen.laravel.com/docs/responses#view-responses
@lsowen agreed.
@futurityverb you have no idea how much time you just saved me :+1: Filed a PR
Most helpful comment
I think the docs need to be updated. They specifically show the
response()->view()method: http://lumen.laravel.com/docs/responses#view-responses