title: How to use database specific functions in Laravel Eloquent ORM for modular usage
body: <p>Im developing a project which uses ORM to make project run on every database system as much as we can.
  Project uses postgresql right now. Im wondering how to use database specific functions without losing ORM modularity.</p>
  
  <p>For example:
  I have to use "extract" function for one query like so;</p>
  
  <pre><code>DELETE FROM tokens AS t WHERE (extract(epoch from t.created_at) + t.expires) &lt; extract(epoch from NOW())
  </code></pre>
  
  <p>If i want to use model class to achieve this. Soon or late i need to write extract function where clause in raw format</p>
  
  <pre><code>Tokens::whereRaw('(extract(epoch from t.created_at) + t.expires) &lt; extract(epoch from NOW())')-&gt;get();
  </code></pre>
  
  <p>If i use query builder</p>
  
  <pre><code>DB::table('tokens')-&gt;whereRaw('(extract(epoch from t.created_at) + t.expires) &lt; extract(epoch from NOW())')-&gt;select()-&gt;get();
  </code></pre>
  
  <p>Same things happens</p>
  
  <p>I need something like when i use postgresql ORM need to use EXTRACT() function or when i use mysql ORM need to use UNIX_TIMESTAMP() function</p>
  
  <p>What the ways i can use to achieve this ?</p>