Answers for "asset('image') laravel"

PHP
3

set image asset path in laravel

//Assets in app/public
// in image
<img src="{{URL::asset('/images/logo.jpg')}}"/>
// in div style
<div style="background-image: url({{URL::asset('images/image.jpg')}});">
</div>
Posted by: Guest on February-01-2022
2

laravel asset

// To access laravel assets
asset('sp-icon/Vodacom-Original.svg')

// To echo the value use braces
{{ asset('you-are-in-public/your-file-name') }}
Posted by: Guest on September-08-2021

Browse Popular Code Answers by Language