[英]Get online users with Laravel 4
I am trying to get online users count in Laravel 4. I am using Sentry 2 with Laravel. 我正在尝试让Laravel 4中的在线用户计数。我在Laravel中使用Sentry 2。 There are 2 columns in users table which are last_login and updated_at.
用户表中有2列,分别是last_login和Updated_at。 I am confused at this point, because everytime last_login and updated_at columns have same value.
在这一点上,我感到困惑,因为每次last_login和updated_at列都具有相同的值。 How do i set new update value in which user operation, even page reload?
如何设置用户操作甚至页面重新加载的新更新值? If it so i can calculate the time between last_login and updated_at, so i can see online users easly.
如果可以的话,我可以计算last_login和updated_at之间的时间,因此我可以轻松地看到在线用户。
Or is there an easy way to find online users in Laravel? 还是有一种简单的方法可以在Laravel中找到在线用户?
Thanks for helping. 感谢您的帮助。
Personally I would go with the suggestion from this link: 我个人会接受来自此链接的建议:
https://stackoverflow.com/a/4073355/3353724 https://stackoverflow.com/a/4073355/3353724
In laravel, I would do this: 在laravel中,我会这样做:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.