Time logged into the system with Laravel 4.2

Asked

Viewed 129 times

0

Good morning. I wonder if Láravel 4.2 has any functionality that tells me how long the user was logged into the system? For example, when the user undoes, I save in the bank that time. When the user logs in again, and then scrolls down, I add the time he was in the first access with the latter, that is, I need to know the total time that the user was logged in to the system.

  • Daniel, then, has nothing ready in this sense, has to be created via programming.

  • Got it, well, I’m gonna find something to see if I can adapt

  • Daniel is not difficult is just a table and a code to write to it, when logging in and logout to the user.

  • So, I need to create 2 fields? One for login and one for logout?

  • It will depend on the implementation as a whole, will have to have the Userid field, Input and Output, I see so right off the bat, of course can be added other fields.

  • So I found this script here: round((strtotime($user->hora_input) - strtotime($hora_output))/3600, 1); only it always returns me -0

  • edit your question and place your progress so far, with the problems found now. But, put everything that made the changes in the table and what you want, what you expect from your code that is not yet happening ...

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.