how to add image , url in laravel view

add image to view

<img src=” {{ asset(‘img/myimage.png’) }} ” >

Explaination : here asset is pointed to public folder in laravel , where lies the img folder containing images.

Reference :

Add url of next page in view

<a href=” {{url(‘/main/dashboard’)}} “> click </a>

Explaination : here main is controller class name and dashboard is a method where code for view is placed in laravel.

Leave a Reply

Your email address will not be published. Required fields are marked *

1 × 4 =