I'm using the Laravel PHP framework and am wondering about a few things. The default application/routes.php
file contains this:
Route::get('/', function()
{
return View::make('home.index');
});
This just outputs the view, but how do I call a controller from there?
I can delete the entire route above and replace it with Route::controller('home')
which seems to use the home controller on the default URL (i.e. example.com/
). But any other controller like Route::controller('article')
doesn't work, only on example.com/article
. How would I set the article controller as the default?