Session usage already answered on two previous post.
Last one: https://laracasts.com/discuss/channels/laravel/how-to-get-id-in-session
Are sessions working
Check storage permissions. Do you see the stored sessions.
Troubleshoot.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have an order and I want to after save, get in session current id of order for next page reports.
use Session;
public function store(Request $request)
{
$order = new Order($request->all());
$order->user_id = auth()->user()->id;
$order->title = $request->title;
$order->body = $request->body;
$order->id = $request->session()->get('id');
$order->description = $request->description;
$order->save();
session(['order_id' => $order_id]);
return redirect()->route('reports.index')->with('order_id', $request->id);
}
In notes page has a input hidden for get session of article id.
<input type="hidden" class="form-control" value="{{ Session::get('order_id') }}" name="id" id="id">
But I see input hidden. It is blank . "".
Please or to participate in this conversation.