validation – Validating broken no Lumen

Question:

On Laravel I have for example:

Route::get( '/produtos/mostra/{id}', 
    'ProdutoController@mostra' 
)->where('id', '[0-9]+');

How would this type of validation be done in Lumen ? Since a route is originated by $app :

$app->get('insert', function () {

});

Answer:

Do so in accordance with the Documentation .

$app->get('/produtos/mostra/{id:[0-9]+}', 'ProdutoController@mostra');
Scroll to Top