在laravel中生成动态图像路径

时间:2015-01-21 06:59:29

标签: php laravel laravel-4

这是我要用laravel方式转换的图像标记

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

我试过

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

但是如何在$DriverDetail['DriverPhoto'];代码中提供值HTML::image

1 个答案:

答案 0 :(得分:1)

它就像连接两个字符串一样简单:

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