title: How we can add php code to model file in CAKE PHP
body: <pre><code>public $hasOne = array(
      'Subscriber' =&gt; array(
          'className' =&gt; 'Subscriber',
          'foreignKey' =&gt; 'UserID',
          'conditions' =&gt; array(
               'Subscriber.end_date &gt;=' =&gt; date('Y-m-d')
          ), 
  )); 
  </code></pre>
  
  <p>Here <code>date('Y-m-d')</code> gives html parse error. Even echo and print is not working in model file.</p>
  
  <p>My aim is to get data from all subscribed users table till current date.</p>