Reputation: 2287
I want to select all records from two tables using Laravel v4 which aren't less than 15min , but i can't. Here is my code:
return Visit::join('users', 'visits.id', '=', 'users.id')->select('ip','users.id','browser','updated_at','name')->where('updated_at','>',time() - (15*60))->get();
Upvotes: 0
Views: 667
Reputation: 57723
My guess is that updated_at
is a DATETIME
field, or some derivative.
Compare with:
->where('updated_at','>', date("Y-m-d H:i:s", time() - (15*60)))
Upvotes: 2