use named route and asset in controller

Posted 11 months ago by mac03733

i am trying to get the image and also set a named route in my controller

     foreach($users as $user){
             $output .= ' 
              <tr>
                 <td >'.$user->id.'</td>
                <td>
                <img src="{{ asset("storage/images/avatar5.png") }}" > //here ?? <-------------
                </td>
                <td>'.$user->name.'</td>                      
                <td>
                <a href="{{route("admin.viewUser",["id"=>'. $user->id .'])}}" class="btn  d-inline">                 
                </a> //here ?? <-------------
                </td>
              </tr>
               ';
            }
        

Please sign in or create an account to participate in this conversation.