laravel - image is not loading using php echo -


i have tried echo table fields 1 one. can't echo image field. code is:

if ($data->prophylaxis_indicated == 1) {     echo "<td><span title='true_logo'> <img src='url('images/1-icon.png')' height='20' width='20'></span></td>"; } else {     echo "<td> <span title='true_logo'><img src='url('images/0-icon.png')'height='20' width='20'></span></td>"; } 

i think problem trying use blade syntax in controller.

use code work

 if(($data->prophylaxis_indicated)==1){                 echo " <td><span title='true_logo'>                 <img src='images/1-icon.png'                 height='20' width='20'>                 </span></td>";                }               else{                 echo "<td> <span title='true_logo'>                <img src='images/0-icon.png'                height='20' width='20'>                </span></td>";              } 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -