Is it possible to reorder or ignore parameters in controller routes?

laravel, laravel-routing, php

Solution

It's possible to manually call controller functions:

Route::get('article/{slug}/{id}', function($slug, $id)
{
    return App::make('ArticleController')->show($id);
});

Problem

The question title is the most explicit I could think of, but here's a use case/example for clarity's sake: Say I define the following route to show an article: ``` Route::get('article/{slug}/{id}', 'ArticleController@show'); ... class ArticleController extends BaseController { public function show($id) { return View::make('article')->with('article', Article::find($id)); } } ``` This won't work, as `show` will misake the `$id` parameter with the `$slug` parameter. Is there a way to pass only the `$id` parameter to the `show` method?

Original source