Laravel image paths from controller to view
<p>My image's path is <code>public/uploads/users/image.png</code> then using <code>src</code> like this:</p>

<pre><code>&lt;img src="{{ asset('uploads/users/image.png') }}" /&gt;
</code></pre>

<p>But for every user the image has to be changed.</p>

<p>I pass the image name of the user from controller as something like this </p>

<pre><code>foreach ($user as $key) {
                $this-&gt;data['user_img'] = $key-&gt;avatar;
            }
</code></pre>

<p>Here, I have to change the user image as per <code>$user_img</code> from controller</p>

<p>How should I give it in the <code>src</code> of image tag.</p>

<p>I tried like this way</p>

<pre><code>src="{{ asset('uploads/users/"{{$user_img}}"')}}"
</code></pre>

<p>But it seems to be an error for me.How should I resole this.</p>

<p>Somebody help me.</p>