try to restrict your id to integers only
Route::get('/products/{name}-{id}', 'ProductController@showProduct')->where([ 'id' => '[0-9]+' ]);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community