Using in_array on collections
<p>I need to check for a name in an array of names but I having trouble passing an array instead of a collection to the in_array() method. </p>

<p>My blade code looks something like this</p>

<pre><code>@foreach($ecn-&gt;areas as $area)
{{ $area-&gt;area }}:&lt;br&gt;
&lt;ul&gt;
    @foreach($area-&gt;people as $person)                              
        @if(in_array($person, $ecn-&gt;signatures-&gt;name ))
        &lt;li&gt;&lt;del&gt;{{ $person }}&lt;/del&gt;&lt;/li&gt;
        @else
        &lt;li&gt;{{ $person }}&lt;/li&gt;
        @endif
    @endforeach
&lt;/ul&gt;
@endforeach
</code></pre>

<p>I know my problem is in the way im trying to access the list of signatures. </p>

<pre><code>@if(in_array($person, $ecn-&gt;signatures-&gt;name ))
</code></pre>

<p>I can access them in another part of the page doing this</p>

<pre><code>@foreach($ecn-&gt;signatures as $signature)
{{ $signature-&gt;name }}&lt;br&gt;
@endforeach
</code></pre>

<p>and everything is fine. </p>

<p>How can I access and pass the list of signatures as an array in this scenario?</p>