![](/img/trans.png)
[英]how to check if user is logged in by his session in route and then call controller method in laravel?
[英]How to know if user is logged with his session id
我需要知道是否有用戶登錄我的網站。 為此,我只有他的會話ID。
我使用以下方法獲取此ID: session-> getId();
可能嗎?
提前致謝。
在用戶登錄時將自定義字段添加到會話中,然后僅檢查該字段
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.