URL : http://localhost/air_ticket/public/search_trips?flight_count=2&trip_status=multicity&departure_location%5B0%5D=Yangon+&arrival_location%5B0%5D=NYAUNG+U&departure_date%5B0%5D=10%2F11%2F2018&l_adult_qty=1&l_child_qty=0&l_infant_qty=0&quantity=1&child_quantity=0&infant_quantity=0&f_adult_qty=1&f_child_qty=0&f_infant_qty=0&both_quantity=1&both_child_quantity=0&both_infant_quantity=0&departure_location%5B1%5D=Mandalay&arrival_location%5B1%5D=TACHILEIK&departure_date%5B1%5D=10%2F12%2F2018&national=L
I am a beginner in Laravel and PHP trying to do this airline ticketing project. I have passed these values from another page after submitting. The thing is, I wanted to get exactly the value of departure_location, 0 index from the URL bar. I used
for ($i = 1; $i<=$flight_count; $i++)
{
$a=$i-1;
//getting locations and days
$departure_location[$i] = $request->input('departure_location['.$a.']');
} To get the value of departure_location[0] from the URL and it gives me a null variable. Is there something wrong with my code.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire