I tried a couple solutions that I've seen here and stackoverflow but nothing works.
I am rendering html content directly from a controller for pdf generation, and in that html I need to access an image from my images folder under public path.
How can I get this right?
This is what I have right now that does not work and no error is shown.
public function convert_customer_data_to_html(){
$customer_data = $this->get_customer_data();
$output = '
<td><img height="50" src="asset(/imageslogo-1.png)" alt="Image"/></td>
'
public_path() will provide you with the path directory upto the public folder.
You can then concatenate your filename as shown below.
{{ public_path().'/imageslogo-1.png' }}
Hope, this helps you.