vendredi 28 août 2015

Redirect to route with parameters in Laravel 5

I know how to send parameters to a route redirect, what i don't know is how to get that parameters in the route controller function...

Here's the function of a post route where i redirect to another get route:

return \Redirect::route('publicReservacionPasoDos', ['comidas' => $comidas, 'bebidas' => $bebidas]);

The other route controller's function is this:

public function pasodos()
{

    $horas = [
        '4:00',
        '4:30',
        '5:00',
        '5:30',
        '6:00',
        '6:30',
        '7:00',
        '7:30',
        '8:00',
        '8:30',
        '9:00',
        '9:30',
        '10:00',
        '10:30',
        '11:00',
        '11:30',
        '12:00',
    ];

    return view('Club.reservacion.paso2');

}

If i run the code as is, it outputs an exception of some parameters i use in the views...



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1LBcght
via IFTTT

Aucun commentaire:

Enregistrer un commentaire