Paul_nld
1 month ago
129
3
Laravel

How to get Last row from table from a user

Posted 1 month ago by Paul_nld

I have a table in which I register various activities. The table lists all activities of all users, now I want to have the last activity of a user. how can i do that everything i made up doesn't work.

     $movements = DB :: table ('movements')
         -> where ('movements.user_id', Auth :: user () -> id)
     -> get ();

Please sign in or create an account to participate in this conversation.