1

Here is my image tag which i want to convert in laravel way

<img src="public/assets/uploads/driver/<?php echo $DriverDetail['DriverPhoto'];?>">

I tried with

{{ HTML::image('public/assets/uploads/driver/', 'Driver Photo', array('class' => 'student-listing-photo')) }}

But how can i give the value $DriverDetail['DriverPhoto']; inside the HTML::image tag.

1
  • Do you mean {{ HTML::image('public/assets/uploads/driver/' . $DriverDetail['DriverPhoto'], 'Driver Photo', array('class' => 'student-listing-photo')) }} ? Commented Jan 21, 2015 at 7:00

1 Answer 1

1

It's as simple as concatenating two strings :

{{ HTML::image('public/assets/uploads/driver/' . $DriverDetail['DriverPhoto'], 'Driver Photo', array('class' => 'student-listing-photo')) }}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.