Laravel 5.3 Scope Return
<p>I'm having problem with this scope in my product Model</p>

<p>My scope look like this:</p>

<pre><code>public function scopeLessNinetyDays( $query ){

    $date = new \Carbon\Carbon;
    $date-&gt;subWeek(12); 

    return $query-&gt;where('created_at', '&lt;', $date-&gt;toDateTimeString())-&gt;get() ;
}
</code></pre>

<p>I tried to loop it in category and the result is at the bottom. I need to return true or false. If the product created_at is in 12 weeks already. This is weird because it returns collection. Instead of single product. </p>

<pre><code> @foreach( $category-&gt;product-&gt;take(4) as $product )
       {{ dd($product-&gt;lessNinetyDays()) }}
    @endforeach
</code></pre>

<p><a href="https://i.stack.imgur.com/CKLjk.png" rel="nofollow"><img src="https://i.stack.imgur.com/CKLjk.png" alt="enter image description here"></a></p>

<p>If I used this code it returns single product. See Image at the bottom.</p>

<pre><code>@foreach( $category-&gt;product-&gt;take(4) as $product )
   {{ dd($product) }}
@endforeach
</code></pre>

<p><a href="https://i.stack.imgur.com/A4iJ1.png" rel="nofollow"><img src="https://i.stack.imgur.com/A4iJ1.png" alt="enter image description here"></a></p>

<p>I don't know how to achieved that goal because of the results. </p>