Answer the question
In order to leave comments, you need to log in
Why is the router not working in Laravel?
Just started to learn and immediately had questions. Router not
working router.php
Route::get('/todo', [
'as' => 'todo',
'uses' => '[email protected]'
]);
class TodoController extends BaseController {
public function index() {
return View::make('todo.index');
}
}
Answer the question
In order to leave comments, you need to log in
Because Laravel sucks when localhost/laravel/public/todo
.
Create a domain, specify a root folder for path/to/todo/public
it, and contact http://todo.dev
.
This is a misconfiguration of Apache. (or whatever web server you have...)
There are three ways:
1. Install Laravel Homestead.
Step by step instructions here . and more details here .
2. If you have wamp. The answer is here. Long step by step guide.
3. Temporary option - try accessing routes like this: localhost/laravel/public/index.php/todo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question