Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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>
Comment

laravel image path


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
Comment

laravel image path

<img src="{{ asset('storage/photo/'.$contact->photo) }}"  alt='{{$contact->photo}}' width="50px" height="50px" alt="">
Comment

PREVIOUS NEXT
Code Example
Php :: php color generator 
Php :: laravel clone row 
Php :: check if object has method php 
Php :: php array check value exists 
Php :: laravel check if record exists 
Php :: carbon format date in laravel 
Php :: laravel 6 get user id 
Php :: what is the hashmap like in php 
Php :: or where laravel 
Php :: laravel log build custom channel 
Php :: array collapse laravel 
Php :: laravel online hash password generator 
Php :: PDOException::("could not find driver") windows 
Php :: return view in laravel controller 
Php :: transform text to lowercase and replace space with dash php 
Php :: php redirect seconds 
Php :: how to submit same form for different purpose using two submit button in php 
Php :: how to get all post fields in wordpress 
Php :: How to run database Query in WordPress? 
Php :: is dir php 
Php :: laravel mass update 
Php :: eloquent limit 
Php :: laravel target class does not exist 
Php :: laravel upgrade php version 
Php :: laravel project create with version 
Php :: PHP sqrt() Function 
Php :: php laravel config 
Php :: blade select selected 
Php :: php mysql prepare query 
Php :: how to get correct file or content mime type using/in php 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =