Script code:
<script type="text/javascript">
function getValue(){
var getvalue=document.getElementById('brand').value;
window.location='products' +getvalue;
}
</script>
This is my script code. Here I am trying to pass the value of the variable 'getvalue'to the route.
Route:
Route::get('products/{getvalue}','categoryController@bValue');
This is my route. Here I am trying to pass the getvalue to the controller.
Controller code:
public function bValue(Request $getvalue)
{
echo $getvalue;
}