Questions tagged [laravel-session]

101 questions
0
votes
1 answer

How to Set & Get Session Data in Laravel Package Development

I am developing a package with a contact form in Laravel. I'm trying to set & get session data, but it's not working with the following. View @if(session('success'))
Bablu Ahmed
  • 4,412
  • 5
  • 49
  • 64
0
votes
2 answers

How to Use Auth() Register During Login Session in Laravel 5.7

I have changed the register page of Laravel 5.7 Auth() to the studentRegister page to register a new student, but it is inaccessible when I'm logged in through another user. The route didn't work while I'm in the session. However, it works perfectly…
0
votes
1 answer

Laravel doesn't store additional session attribute in database

I'm trying to store a specific attribute in the sessions table of the user by using the laravel session logic. Sessions Table Migration Schema::create('sessions', function (Blueprint $table) { $table->string('id')->unique(); …
thmspl
  • 2,437
  • 3
  • 22
  • 48
0
votes
0 answers

Retrieving Session Data From Laravel Users in the Console

Due to a bug, some data didn't record from the session at the time a user logged in the first time. That session's data is still there and needs recording in the appropriate places within the database. Is there any way to retrieve user session data…
eComEvo
  • 11,669
  • 26
  • 89
  • 145
0
votes
2 answers

how to add new array to an global session array in laravel?

I want to add new arrays to an global session array in laravel 5.6 The global session is cart. I want add items to this array. I try this: for first time: $item = ['key' => 'val1']; session()->push('cart', $item); dd(session()->get('cart')); It…
Areza
  • 671
  • 14
  • 26
0
votes
0 answers

Strange Laravel Flash Session on Phone browser

I've found a very strange issue with Laravel (5.4) flash session. Let's say I have 2 forms, signup and login. each form has laravel validation in its controller. the problem is: Validation error message won't appear after redirect back (even the…
GeLiNa
  • 21
  • 3
0
votes
1 answer

why error "laravel 5.5 The page has expired due to inactivity. Please refresh and try again" even after {{ csrf_field() }}

I already have {{ csrf_field() }} in form. it works fine but after inactivity for some time create this error. why ?
Sarita Sharma
  • 253
  • 2
  • 8
  • 19
0
votes
1 answer

Laravel - set session from form input

I cannot display session value in my view. I only want to display it to see if it's correctly set inside the controller. Is it correctly set in controller? How can I check? I have this in view:
Victordb
  • 519
  • 1
  • 11
  • 25
0
votes
1 answer

set session when send posts data from external website via curl to action controller

I using a code in my Home Controller : public function myAction1(Request $request) { $request->session()->put('redirect', $_POST['redirect']); } public function myAction2(Request $request) { $request->session()->get('redirect'); } and this…
Rai Rz
  • 493
  • 9
  • 22
-1
votes
1 answer

How to add variable to session value in Laravel

I have a Controller method that updates a record in the DB: $brand_owner_relation = Relation::where('rel_brand_id',$id)->where('rel_is_active',0)->first(); $brand_owner_relation->rel_status_id = 10; $brand_owner_relation->save(); return…
japose7523
  • 29
  • 2
  • 15
-1
votes
1 answer

How to determine session value at Controller

I have set a session value like this at Blade: @php if(...){ Session::put('sent','city') }else{ Session::put('sent','country') } @endphp And now, I need to check the sent session value at the Controller but don't know how... So if you know,…
user10502851
1 2 3 4 5 6
7