“Atur jalur aset gambar di Laravel” Kode Jawaban

Atur jalur aset gambar di 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>
Snippets

jalur gambar Laravel


You have to put all your assets in app/public folder, and to access them from your views you can use asset() helper method.

Ex. you can retrieve assets/images/image.png in your view as following:

<img src="{{asset('assets/images/image.png')}}">

this answer is from stack-overflow
by->Walid Ammar
fellow web surfer

Jawaban yang mirip dengan “Atur jalur aset gambar di Laravel”

Pertanyaan yang mirip dengan “Atur jalur aset gambar di Laravel”

Lebih banyak jawaban terkait untuk “Atur jalur aset gambar di Laravel” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya