---
title: "Discussion on \"How to store user id in the Laravel session table\" | Hashnode"
description: "Discussion on \"How to store user id in the Laravel session table\". Sometimes you want to store the user id with the session so you can purge all sessions or even a single session creating a more secure system for your users, or maybe you want to see how many times a user is logged in. There are many use cases but it..."
url: "https://hashnode.com/posts/how-to-store-user-id-in-the-session-table/659458823fb912813314a25c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to store user id in the Laravel session table](https://alex.bouma.blog/how-to-store-user-id-in-the-session-table?utm_source=hashnode&utm_medium=feed)

Sometimes you want to store the user id with the session so you can purge all sessions or even a single session creating a more secure system for your users, or maybe you want to see how many times a user is logged in. There are many use cases but it...

Aug 31, 2015 · 2 min read · alex.bouma.blog  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#php](https://hashnode.com/tag/php)
-   [#guide](https://hashnode.com/tag/guide)

## Written by

[Alex Bouma](https://hashnode.com/@stayallive)

@stayallive · The Netherlands

  
[View profile](https://hashnode.com/@stayallive)

PHP artisan, full stack dev and server wrangler.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
