I am working on laravel eCommerce API. API does not support sessions. how can I develop cart functionality without storing cart items in the database?
I am working on laravel eCommerce API. API does not support sessions. how can I develop cart functionality without storing cart items in the database?
By default, you can't use sessions in api because larval won't initiate sessions in case of api. look at kernel.php.
You can add middleware "web" to your route or add \Illuminate\Session\Middleware\StartSession::class, to middleware api anyway. But try to avoid it (personal opinion).