I try to send more than one parameter through a URL in Laravel, I do not know if it is the correct way to do it, because I am receiving an error.
This is my code in one of my views:
<a href="{{url('anexaradultos',$idguest->id,$idbook->id,$idroom->id)}}">Agregar adultos</a>
My function inside the controller is as follows:
public function anexadult($idguest,$idbook,$idroom){
$idguest =Guests::find($idguest);
$idbook = Books::find($idbook);
$idroom = Rooms::find($idroom);
return view("agregar_organizador2",array("idguest"=>$idguest,"idbook"=>$idbook,"idroom"=>$idroom));
}
When I click on the link where I send the URL, it shows me the following error:
https://localhost:8081/anexaradultos/1 Failed to load resource: net::ERR_CONNECTION_CLOSED
The function of the controller looks good to me. I tell you the changes that I think can solve the problem.
On routes:
You can call the link like this:
There is more information in the Laravel documentation if you need it.
I will complement the answer in the following
in the link http://localhost/arbolito/public/Procedimiento_arbole/index/2
in the router it would be like this little tree\routes\web.php
**in the controller it would be**
}