Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel upload image

if (!empty($request->image)) {
    $file =$request->file('image');
    $extension = $file->getClientOriginalExtension(); 
    $filename = time().'.' . $extension;
    $file->move(public_path('uploads/'), $filename);
    $data['image']= 'public/uploads/'.$filename;
}
 
PREVIOUS NEXT
Tagged: #laravel #upload #image
ADD COMMENT
Topic
Name
9+3 =