Last active
February 24, 2017 23:26
-
-
Save lira92/fe87eb6fc0526b1dc3f7cd9170a718ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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