Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel upload image to public folder

<?php

if($request->hasFile('image')){
    $image = $request->file('image');
    $image_name = $image->getClientOriginalName();
    $image->move(public_path('/images'),$image_name);

    $image_path = "/images/" . $image_name;
}

?>
 
PREVIOUS NEXT
Tagged: #laravel #upload #image #public #folder
ADD COMMENT
Topic
Name
6+1 =