user1202826
user1202826

Reputation:

Laravel 4 (Beta 5) Routing error

I decided to use a new framework to me for my new project so i started with Laravel! I'm starting to like it, had few problems but it sorted out. But now i'm having hard times with Routing!

Using HomeController i get index page:

Route::get('/', 'HomeController@index'); and everything is ok.

But i created new controller MeteoController using Artisan. And routing:

Route::get('test', 'MeteoController@Attuale'); where controller is:

class MeteoController extends \BaseController {

public function Attuale()
{
    return View::make('meteo/meteoattuale');
}

}

Neither doesn't work with:

Route::get('test', function(){
   return View::make('meteoattuale');
});

Everytime calling /test i get 404. I've googled and did: dump-autoload, even htaccess with mod_rewite. Any ideas on what could cause this problem?

Thanks.

Upvotes: 0

Views: 867

Answers (3)

Abhishek Adhikary
Abhishek Adhikary

Reputation: 1

Had the same problem running L4 on WAMP (Windows 8). Solution that worked for me was:

-open apache httpd.conf and find

#LoadModule rewrite_module modules/mod_rewrite

-remove hashtag

-save httpd.conf

-restart WAMP

done!

Upvotes: 0

user1202826
user1202826

Reputation:

The problem was in .htaccess and server configuration.

Problem solved by this post: Stackoverflow

And this one: Epigroove.com

Upvotes: 1

user2141625
user2141625

Reputation: 291

Remove the \ from BaseController.

Upvotes: 0

Related Questions