Im using Laravell framework. This a banner for events, only showing the events that exist after the current date.
This is the current function on routes.php
Route::get('/banner', function()
{
$date = time();
$events = Event::where('date', '>', $date)->get();
return View::make('banner')->with('events', $events);
});
In the view, this shows all the events, doesnt matter if is before or after the current date. And if i do this change:
$events = Event::where('date', '<', $date)->get();
This dont show anything.
The view is working good, my main problem here is that i cant find how to fix this.