L
L
leopardo112015-06-29 21:03:33
Laravel
leopardo11, 2015-06-29 21:03:33

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]'
]);

controller
class TodoController extends BaseController {

  public function index() {
    return View::make('todo.index');
  }
}

and the view in view/todo/index.blade.php
when going to the address localhost/laravel/public/todo, climbs out 404, although the main laravel works.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
JhaoDa, 2015-06-29
@JhaoDa

Because Laravel sucks when localhost/laravel/public/todo.
Create a domain, specify a root folder for path/to/todo/publicit, and contact http://todo.dev.

Y
Yan Datsyuk, 2015-07-03
@YanDatsyuk

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 question

Ask a Question

731 491 924 answers to any question