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
Post a Comment