Lumen-framework: View method missing on response helper

Created on 22 Jun 2015  路  3Comments  路  Source: laravel/lumen-framework

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.

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

All 3 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jampack picture jampack  路  3Comments

Andrei-Vakulski picture Andrei-Vakulski  路  3Comments

matthewsuan picture matthewsuan  路  3Comments

rmblstrp picture rmblstrp  路  5Comments

cvinothkumar picture cvinothkumar  路  3Comments