Undefined property: Illuminate\Database\Eloquent\Builder
<p>This strange thing is happening to me.I have the code below :</p>

<pre><code>$state_image =States_Images::where('id_state', $id);
echo $delete_path=$state_image-&gt;name;
</code></pre>

<p>and the result is :</p>

<pre><code>Undefined property: Illuminate\Database\Eloquent\Builder::$name
</code></pre>

<p>Someone help me pls :( </p>