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

davy_yg's avatar
Level 27

Session

I wonder why pulling the message using with ('error'

return back()->with('error', 'Email atau password salah');

I have to use session::get to show the error message?

Is it the same thing like ?

Session('error', 'Email atau password salah');

Any reference for that?

0 likes
3 replies
davy_yg's avatar
Level 27

If I do this:

$data = Profile::all();
		
return view('admin.index')->with('list', $data);

It does not store the data into session, right?

Please or to participate in this conversation.