Questions tagged [laravel-session]
101 questions
1
vote
2 answers
How to use on Laravel guard for the main domain and another for the subdomains
I'm building a multi-tenant application where the idea is the admins access through the main domain (http://myapp.app) to the dashboard and the regular users access to another dashboard on their respective subdomains (http://tenant-a.myapp.app).
To…

Mirdrack
- 780
- 12
- 28
1
vote
0 answers
Laravel 5.5 Rest API Session store not set on request
I am implementing rest api in my laravel project. I want to save the access token which i got from the api response in session. When i tried this code, postman shows this error: Session store not set on request

Zammuuz
- 708
- 4
- 18
- 43
1
vote
0 answers
validate() function redirect in chrome browser not showing any validation errors (more than 3 errors)
Laravel 5.4 version
The validate() function works until I test more than 3 errors in the form. Upon automatic redirect after buildfailedvalidationresponse function, the 4 $error messages aren't present on and neither is the old form data. This only…

Drizzle53
- 124
- 2
- 9
0
votes
0 answers
How to store the logged User Value in a shared variable between routes in Laravel
i'm coding an application with laravel and since i'm still a beginner i got stuck on the login part , i didn't use the authentication library for some specefic details but now when i want to store the connected user identity values i don't know how…
0
votes
0 answers
Laravel 8's session usage
Hello everyone in here.
I have chosen the laravel's database session method and want to store each registering user's Id in my sessions table precisely in the 'user_id' so that I can check if a user is connected or not.
For that I processed this…

GAOUSSOU DIARRA
- 3
- 3
0
votes
2 answers
Why do you need to regenerate Laravel session after login?
So in Laravel documentation it says that we "should regenerate the user's session to prevent session fixation"
But when I Auth::login($user) I see that session updates to a different id already.
// AuthController
public function __invoke() {
//…

ProgZi
- 1,028
- 3
- 14
- 25
0
votes
0 answers
How to get filename of Laravel SESSION data when using using 'file' driver
I've got a basic, default install of Laravel with Breeze running. I want to be able to load the session data from a PHP script that is not running Laravel.
I'm using the 'file' SESSION_DRIVER. I can see the session files in framework sessions. For…

Al_
- 2,479
- 7
- 29
- 43
0
votes
1 answer
Laravel Flash Session does not work expectedly sometime
I am working on a project in which I am using flash session after form submit to display the message. But the problem is that the flash session message sometimes appears and sometime not. I shared the code also here.
this is the function:
public…

Hammad Butt
- 73
- 2
- 7
0
votes
0 answers
How can I keep the selected checkboxes in session in the pagination structure?
For a calculation I need to select the listed data and send the id values via the button. In the method I tried, when I switch pages, it only calculates the data I selected on that page. When I did research, I learned that it is necessary to keep…

amanigurmu
- 11
- 6
0
votes
0 answers
Session sends user object weirdly
I'm working on Laravel 9 and I have notices something that I've never seen before.
Basically I'm trying to make a Login system with Laravel 9 and for the next step of logging users in, I added an input to check for the user mobile phone…

yetep93258
- 33
- 1
- 13
0
votes
0 answers
How to Logout All Devices Without Password in Laravel Sanctum?
I am using Laravel Sanctum for both API and SPA authentication.
When an SPA user logs out, I need to logout him from all other devices too without asking for password. This is a requirement (and hence I cannot go other-way).
I am deleting all tokens…

Chitholian
- 432
- 1
- 10
- 19
0
votes
0 answers
Increment lifetime session and cookie api laravel
I am using laravel as an api, and I send the client a cookie with the session token to validate. How could I increase the lifetime of the session and the cookie every time I make a request from the client, so that the session is not closed?
I don't…
0
votes
0 answers
How to add softdelete to "session" table in Laravel?
I am working on a Laravel project and I would like to add softdelete feature to the session table. Because I want to revoke delete permission from the user that connects to the database, thus deleting session row is required. So, I want to delete it…

Kardo Aziz
- 125
- 8
0
votes
0 answers
Laravel Session and Cache Read/Write Driver
I would like to use different connection for reading and writing to session and cache.
I am using redis as cache and session storage.
Here are my env configs…

chetan patel
- 596
- 1
- 6
- 16
0
votes
1 answer
how to get session in databse by user_id and set that for another user in laravel?
I have saved my session in database, Now I want to get the shopping cart session of special user by user_id after scanning a qrcode and set that shopping cart session for Auth::user().
as you know, the session table in databse have these fields:
id,…

aref razavi
- 413
- 2
- 12