purpose of using web middleware when saving session

Posted 1 year ago by peterlee

Hi, I just solved the problem that not storing session value, like writing a single line code session( [ 'key' => 'value' ]); by set rouing as 'web' middleware Route::group([ 'middleware' => ['web'] ], function () { .... }

but I still do not understand why web middleware is required in order to save session key - value in framework/sessions

what's the purpose of using web middleware to store session value ?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.