Laravel 5.2 : Elequent deleted_at Null/!Null with where clause and count
<p>I am using eloquent to fetch some records on the basis of condition.</p>

<pre><code>$completed = Task::where('user_id', Auth::user()-&gt;id)-&gt;where('deleted_at', '=', !Null)-&gt;get()-&gt;count();

$incompleted = Task::where('user_id', Auth::user()-&gt;id)-&gt;where('deleted_at', '=', Null)-&gt;get()-&gt;count();
</code></pre>

<p>The first one returns <code>0</code> which is correct.
But the second one returns <code>0</code> which should be <code>1</code> instead.</p>

<p>Table :</p>

<p><a href="https://i.stack.imgur.com/v38TA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v38TA.png" alt="Table Data"></a></p>

<p>Am i missing something ?</p>