Laravel How to store extra data/value in session Laravel

后端 未结 5 591
我寻月下人不归
我寻月下人不归 2021-01-20 23:11

I\'m using default auth() in laravel login (email & password) Now i try to take input from the user in text field like (Age or City)

Now i want to store (Age/City) i

5条回答
  •  攒了一身酷
    2021-01-20 23:30

    You can use

    Session::put('key', 'value');

    To get key from Session use

    Session::get('key');
    

    You can use the session() helper function as @Alexey Mezenin answer.

    Laravel Session Documentation

提交回复
热议问题