A route with optional parameter works when doing like this:
Route::get('{anything}',function($anything){echo $anything;});
but I would like to use a controller. Doing like this produces an error:
Route::get('{anything}','redirectController');
controller:
class redirectController {
public function index($anything){
echo $anything;
}}
What may be the problem? (using laravel 4.2)
update: I renamed the controller with capital letter, and tried this:
Route::get('{anything}',['uses' => 'RedirectController@index']);
but it's still an error: "Call to undefined method RedirectController::getAfterFilters() ".