0

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.

Antonio Carlos Ribeiro
  • 86,191
  • 22
  • 213
  • 204

3 Answers3

1

The problem was in .htaccess and server configuration.

Problem solved by this post: Stackoverflow

And this one: Epigroove.com

Community
  • 1
  • 1
0

Remove the \ from BaseController.

user2141625
  • 271
  • 1
  • 3
  • 10
  • Nope, doesn't change anything. When creating new controller Artisan by default add / –  May 19 '13 at 17:02
  • Yes, and non of them works. First i had page and controller names containing (-), so thought that cuold be the problem but nothing. Don't know is it Laravel or server. But from what i red Laravel is pretty stable now and most people is using it for thier projects. –  May 19 '13 at 18:42
0

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!