In laravel project I have mysql table 'users' in which is timestamp column named last_visit. I want to get all users, which last_visit is not older than one day.How to perform that?
You can combine where clauses and Carbon to archive what you want:
DB::table('users')->where('last_visit', '>', Carbon::today()->subDay(1));
or
Usee::where('last_visit', '>', Carbon::today()->subDay(1));