Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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

how to store an image in laravel directly from url

use Storage;
$url = "http://www.google.co.in/intl/en_com/images/srpr/logo1w.png";
$contents = file_get_contents($url);
$name = substr($url, strrpos($url, '/') + 1);
Storage::put($name, $contents);
Comment

laravel image path

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

pass image path in laravel blade

<img src="{{ asset('images/foo.png') }}" alt="tag">
Comment

PREVIOUS NEXT
Code Example
Php :: laravel pagination problem in blade 
Php :: php get last digit of number 
Php :: wp_cache_get 
Php :: laravel log reader 
Php :: macos how host laravel website on localhost and intranet wifi 
Php :: php ++ 
Php :: how to get attachments to emails php 
Php :: php json get value by key 
Php :: date format with t and z php 
Php :: php array get value at index 
Php :: php pdf 
Php :: php http errorcode 
Php :: custom pagination laravel css 
Php :: get node id in twig drupal 
Php :: wordpress is_tag function 
Php :: laravel collection get unique values 
Php :: laravel run all seeders 
Php :: function passing multiple arguments using 3 dots php 
Php :: date_default_timezone_set php bangladesh 
Php :: laravel model withCount relationship condition 
Php :: carbon between hours 
Php :: laravel attach 
Php :: how to sort with array and after print by for loop in php 
Php :: how to write orderby in join query with where clause in codeigniter 
Php :: artisan in route in laravel 
Php :: php last item of array 
Php :: laravel timezone 
Php :: cut the first character in php 
Php :: Session/Session.php error codeigniter 3 
Php :: laravel create on model 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =