title: How to use order by in Laravel when it uses CASE WHEN?
body: <p>I can use <code>orderBy</code> method in Laravel like this:</p>
  
  <pre><code>$posts = Post::orderBy('id', 'DESC')-&gt;get();
  </code></pre>
  
  <p>Ok, what about when there is <code>CASE</code> in the <code>ORDER BY</code> clause? Like this:</p>
  
  <pre><code>ORDER BY 
  CASE
     WHEN id.PinRequestCount &lt;&gt; 0 THEN 5
     WHEN id.HighCallAlertCount &lt;&gt; 0 THEN 4
     WHEN id.HighAlertCount &lt;&gt; 0 THEN 3
     WHEN id.MediumCallAlertCount &lt;&gt; 0 THEN 2
     WHEN id.MediumAlertCount &lt;&gt; 0 THEN 1
  END desc,
  </code></pre>
  
  <p>How can I write this ^ in Laravel?</p>