0
$allImageNames = [];

if ($request->hasFile('image')) {
    $files = $request->file('image');

    foreach($files as $file) {
        $imageName = microtime() . '.' . $file->getClientOriginalExtension();
        $destinationPath = public_path('images');
        $file->move($destinationPath, $imageName);
        $allImageNames[] = $imageName; 
    }

    $allImageNames = json_encode($allImageNames);
    $data['images'] = $allImageNames;   
}

i have done this to upload the bigger image but how do i resize the image size

Davit Zeynalyan
  • 8,418
  • 5
  • 30
  • 55
  • 2
    What have you tried? A simple search query ("php resize image") in your favorite search engine will turn up thousands of clear tutorials and useful packages. – Loek Jun 01 '18 at 09:55
  • 2
    For your reference: https://stackoverflow.com/questions/40358510/resize-image-in-laravel-5-2 – Himanshu Upadhyay Jun 01 '18 at 09:58

0 Answers0