Laravel-datatables: how to show image in datatable column

Created on 11 Aug 2017  路  2Comments  路  Source: yajra/laravel-datatables

hi sir i am try to show image in one column
like this
->addColumn('product_brand_logo', function ($product_brand) { return '<img src="{{ URL::to('uploads/users')'.$image->image.'}}" border="0" width="40" class="img-rounded" align="center" />';

in out put it will show like this ==>{{URL::to('uploads/users')imagename.png}}

Code snippet of problem

System details

  • windows 10
  • PHP Version 7
  • 5.3
  • Laravel-Datatables Version 6.0

Most helpful comment

thanks sir my problem solved

All 2 comments

You've to make the product_brand_logo column raw with: rawColumns(['product_brand_logo'])

thanks sir my problem solved

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Abdulhmid picture Abdulhmid  路  3Comments

techguydev picture techguydev  路  3Comments

shadoWalker89 picture shadoWalker89  路  3Comments

nasirkhan picture nasirkhan  路  3Comments

josiahke picture josiahke  路  3Comments