I need to have a route for multiple pricing levels (bronze
, silver
and gold
). Currently I have:
Route::get('/{level}', [ 'as' => 'pricing', 'uses' => 'PagesController@pricing']);
However, this matches anything, how can I make so it matches only: bronze
, silver
or gold
while reading the value in my controller like this:
public function pricing($level) {
$data['level'] = $level;
return View::make('pages.pricing', $data);
}