vendredi 28 octobre 2016

Input array loop on controller laravel 5

I have inputs array and i need to make a foreach but laravel $request->all() only return last one:

url:

http://localhost:8000/api/ofertas?filter_pais=1&filter_pais=2&filter_pais=3

controller:

public function filtroOfertas(Request $request){
        return $request->all();
}

result:

{"filter_pais":"3"}

result should return 1, 2 and 3 and i need to make a foreach in filter_pais. Any solution? Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire