Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel copy image

//$contact->photo is file name with extension -> dljfkaldla.jpg 
$newName = 'copy_'.time().'_'.$contact->photo;
                $newPathWithName = 'public/photo/'.$newName;
                if (Storage::copy('public/photo/'.$contact->photo , $newPathWithName)) {
                dd("success");
                }
 
PREVIOUS NEXT
Tagged: #laravel #copy #image
ADD COMMENT
Topic
Name
1+5 =