I have a table that contains two main fields; description and file_url. file_url is the path to an image. I tried doing this within a table shown below.
Table::create(array(
"dataStore"=>$this->dataStore("pdfs"),
"showFooter"=>true,
"columns"=>array(
"description",
"file_url"=>array(
"cssStyle"=>"text-align:right",
"prefix"=><?php echo base_url(); ?>,
)
),
"cssClass"=>array(
"table"=>"table-bordered table-striped table-hover"
)
));
What this results in is show in the attached image as the path rather than the image. see "11.pdfs". Please advise. Just to test the image I created this, and it seems to display the image fine.
<body>
<img src="<?php echo base_url(); ?>assets/uploads/8d7a9-Screenshot-from-2019-05-04-09-58-25.png" />
<img src="<?php echo base_url(); ?>assets/uploads/files/step-functions-dg.jpg" />
</body>