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 [].



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire