php - Why does View('index') work but not View::make('index') in Laravel? -


in controller,

i'm returning

return view('index') returns appropriate php file.

however, when try return view::make('index')

fatalerrorexception in line 28: class 'app\http\controllers\view' not found 

what wrong?

i'd return view::make('index')->with('user',$user) gives unknown object error on view side.

the problem not actual view class view

you can either reference alias in root namespace prepending backslash:

return \view::make('index'); 

or add import statement @ top:

use view; 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -