mercredi 22 septembre 2021

How to add new request values to call a function in same controller

How to call a function save(Request $request) from another function in same Controller.

foreach ($_parts as $key => $part_data) {
                $request->item = $part;
                $request->qty = $part_data->quantity;
                $call = $this->save($request);
            }

and my save function is

public function save(Request $request) {
        dd($request->all());
}

the dd($request->all()) returns [].



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

Aucun commentaire:

Enregistrer un commentaire