How do i write below query to update the login status currently logged in adminusers
$status = \DB::table('admin')->where(['login_status',"no"]);
$status->update(['login_status'=>"yes"]);
//above query is updating status for all the adminusers i need to update only adminusers who are logged in..
Well, how do you keep tab of who is logged in and who is not?
You could create a column where you could keep the user's last activity timestamp and if current timestamp minus last activity timestamp is less than like 2 minutes (some arbitrary value), you could consider the user logged in.
Then, you could change your query to get those users with 2 minutes difference between current timestamp and their last activity timestamp and only update status for them.