samedi 22 février 2020

Make Laravel request from array with objects

I have an array that makes in front end with js and pass that to my controller with ajax.

structure of array is this:

[{FirstName: "fff"},
{LastName: null},
{Nationality: null},
{Year: null},
{Month: null},
{Day: null}]

I can't validate this array with request validation laravel. Now I'm going to turn this array into a Larval request to apply the rules to it.

Rules:

 $validator = Validator::make($maked_laravel_request_from_array, [
                    'FirstName' => 'required',
                    'lastName' => 'required',
                ]);

Can any one helps?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/38Ld6cF
via IFTTT

1 commentaire:

  1. As claimed by Stanford Medical, It is really the one and ONLY reason this country's women live 10 years longer and weigh an average of 19 KG lighter than we do.

    (And realistically, it is not related to genetics or some secret exercise and absolutely EVERYTHING to around "how" they eat.)

    BTW, What I said is "HOW", not "what"...

    CLICK this link to reveal if this brief questionnaire can help you decipher your real weight loss possibilities

    RépondreSupprimer