I installed Laravel 4 using Composer and also set up a virtual host. Currently, only the root route is working:
<?php
Route::get('/', function()
{
return View::make('hello');
});
This is not:
Route::get('/hello', function()
{
return View::make('hello');
});
What I'm trying to hit is TasksController
at /tasks
:
Route::resource('tasks', 'TasksController');
This is giving me 404 error as well. What could I be doing wrong? I have a default .htaccess file at the root of my project:
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
I am using localhost on a Mac.
Just for a laugh, see if /index.php/hello
works.
If so, then most likely it's a .htaccess
problem.