Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

azharmn's avatar

Session data into <input>

public function show(Request $request, $id) { $data=$request->session()->get('$batchref'); return view('journals.create'); }

How to insert the value of $data into another form

0 likes
4 replies
Snapey's avatar

pass the data to the view, same as passing any other data

azharmn's avatar

Passing data => return view('journals.create',['batchname'=>$data]);

create.blade.php: Batch Ref

How to insert the value of $data into an input field?

MichalOravec's avatar

Just add it to value attribute

<input name"batchname" value="{{ $batchname}}">

Please or to participate in this conversation.