How do I send two parameters via url? php

0

Hi, I'm using laravel, I'd like to know how I can send two parameters per url ..

Route:

Route::get('detalle/{subcategoria}/{codigo}', [
    'as' => 'detalle',
    'uses' => 'principalController@cargarDetalle',
]);

Url:

<a href="{{ route('detalle',['subcategoria' => $articulo->subcategoria, 'codigo' => $articulo->id])}}#article"></a>

I get the following error.

    
asked by RubxnMC 19.12.2017 в 14:59
source

1 answer

1

Good Day try to put it in the following way

Route::match(array('GET','POST'),'subcategoria/{categoria}/{subcategoria}',['as' => 'codigo', 'uses' => 'principalController/cargarDetalle']);
    
answered by 19.12.2017 в 15:07