Skip to content

Instantly share code, notes, and snippets.

@lira92
Last active February 24, 2017 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lira92/fe87eb6fc0526b1dc3f7cd9170a718ba to your computer and use it in GitHub Desktop.
Save lira92/fe87eb6fc0526b1dc3f7cd9170a718ba to your computer and use it in GitHub Desktop.
<?php
namespace App\View\Cell;
use Cake\View\Cell;
class NextEventCell extends Cell
{
public function display()
{
$this->loadModel("Events");
$nextEvent = $this->Events->find()->where(['date >=' => date("Y-m-d")])->first();
$this->set(compact('nextEvent'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment