0

I am trying to display an image instead of word "back" to go to previous page how do i do that ?

 {!! Html::linkRoute('authors', Html::image(images/back.png)) !!}
mohsin
  • 594
  • 2
  • 8
  • 29
  • There is no such thing as Html in L5.1 anymore, are you using a package? – Elie Faës Nov 29 '15 at 09:45
  • there is dear, it's blade templating engine I am talking about – mohsin Nov 29 '15 at 10:37
  • Can you point it where it is in the doc or source code? – Elie Faës Nov 29 '15 at 10:46
  • Possible duplicate of http://stackoverflow.com/questions/19007999/creating-image-link-with-html-helper – Nehal Hasnayeen Nov 29 '15 at 11:12
  • http://laravel.com/docs/5.0/templates – mohsin Nov 29 '15 at 11:58
  • No, @PeterPan666 is right. It's been taken out of the core, and you do need to pull that in through a package. It's also different from blade templates. Finally, whether you are using the laravel collective package or the original package, you can't do this with the HtmlBuilder because the link method automatically applies `htmlentities`. – Thomas Kim Nov 29 '15 at 18:17
  • Yeah thank you @moshin. You give us a link to the 5.0 doc where there is absolutely no reference of HTML class anywhere... HTML and Form have been deprecated since L5.0 has it's stated right here http://laravel.com/docs/5.1/upgrade#upgrade-5.0 – Elie Faës Nov 29 '15 at 18:33
  • ah my bad, sorry for that, I understand now – mohsin Dec 01 '15 at 03:44

1 Answers1

0

The only thing that is not okay with your code is the missin single quotes

{!! Html::linkRoute('authors', Html::image('images/back.png')) !!}

but if that does not work, you can always use an a element

<a href="{{ route('authors') }}" title="Title">Html::image('images/back.png')</a>
teeyo
  • 3,665
  • 3
  • 22
  • 37