title: How to show uploaded image to CGridView and Table in Yii?
body: <p>I have uploaded images into my project folder. But I cannot show it in the:
  1. CGridVIew
  <img src="https://i.stack.imgur.com/pp34U.png" alt="enter image description here"></p>
  
  <ol start="2">
  <li>Table
  <img src="https://i.stack.imgur.com/QCci1.png" alt="enter image description here"></li>
  </ol>
  
  <p>Can anyone teach me how to do it?? Thanks all</p>
  
  <p>And this is my code in views/barang/admin</p>
  
  <pre><code>&lt;?php
  /* @var $this BarangController */
  /* @var $model Barang */
  
  $this-&gt;breadcrumbs=array(
  'Barang'=&gt;array('index'),
  'Manajemen Barang',
  );
  
  $this-&gt;menu=array(
  array('label'=&gt;'Daftar Barang', 'url'=&gt;array('index')),
  array('label'=&gt;'Tambah Data Barang', 'url'=&gt;array('create')),
  );
  
  Yii::app()-&gt;clientScript-&gt;registerScript('search', "
  $('.search-button').click(function(){
  $('.search-form').toggle();
  return false;
  });
  $('.search-form form').submit(function(){
  $.fn.yiiGridView.update('barang-grid', {
      data: $(this).serialize()
  });
  return false;
  });
  ");
  ?&gt;
  
  &lt;h1&gt;Manajemen Barang&lt;/h1&gt;
  
  &lt;p&gt;Kalo mau nyari di kotak pencarian bisa dengan tambahin ini: (&lt;b&gt;&amp;lt;&lt;/b&gt;, &lt;b&gt;&amp;lt;=&lt;/b&gt;,     &lt;b&gt;&amp;gt;&lt;/b&gt;, &lt;b&gt;&amp;gt;=&lt;/b&gt;, &lt;b&gt;&amp;lt;&amp;gt;&lt;/b&gt;, &lt;b&gt;=&lt;/b&gt;) gan &lt;/p&gt;
  
  &lt;?php echo CHtml::link('Pencarian Lanjut','#',array('class'=&gt;'search-button')); ?&gt;
  &lt;div class="search-form" style="display:none"&gt;
  &lt;?php $this-&gt;renderPartial('_search',array(
  'model'=&gt;$model,
  )); ?&gt;
  &lt;/div&gt;&lt;!-- search-form --&gt;
  
  &lt;?php $this-&gt;widget('zii.widgets.grid.CGridView', array(
  'id'=&gt;'barang-grid',
  'dataProvider'=&gt;$model-&gt;search(),
  'filter'=&gt;$model,
  'columns'=&gt;array(
      'id_barang',
      'nama_barang',
      'id_merk',
      'harga',
      'foto',
      /*
      'deskripsi',
      */
      array(
          'class'=&gt;'CButtonColumn',
      ),
  ),
  )); ?&gt;
  </code></pre>
  
  <p>Hi, I have enter the code of my admin.php in here. Is that you need to see? If no, I will update the controller and the model. Thanks</p>