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.
– novic
Got it, well, I’m gonna find something to see if I can adapt
– Daniel Swater
Daniel is not difficult is just a table and a code to write to it, when logging in and logout to the user.
– novic
So, I need to create 2 fields? One for login and one for logout?
– Daniel Swater
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.
– novic
So I found this script here: round((strtotime($user->hora_input) - strtotime($hora_output))/3600, 1); only it always returns me -0
– Daniel Swater
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 ...
– novic