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

CODE-AXION's avatar

I want to keep laravel breeze default and the breeze api in a single project

not able to configure different session driver for both web and api

i am using laravel and currenlty have laravel breeze default installed now i also want to install laravel breeze api but that would require to change SESSION_DRIVE=cookie how can i use both file and cookie for 2 differnet purposes

file for web base authentication cookie for SPA base api authentication ?

kinda like this:

# For web-based authentication (using Laravel Breeze)
SESSION_DRIVER=file
SESSION_LIFETIME=120

# For API authentication (using Laravel Breeze API)
API_SESSION_DRIVER=cookie
API_SESSION_LIFETIME=120

0 likes
0 replies

Please or to participate in this conversation.