I have a problem in 4 laravel already a few days ago and still can not understand. When I run the route directly so -> Route :: get ('/', 'HomeController@getIndex'); access it normally, but when I do it via redirect me back that the file was not found. Below is my code.
my route:
Route::get('/', function()
{
return Redirect::to('HomeController');
});
my controller:
class HomeController extends BaseController {
public function getIndex()
{
return View::make('home.hello');
}
}
my view:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>testing</title>
</head>
<body>
testing
</body>
</html>
error:
The requested URL /HomeController was not found on this server.