php - Looping through image array and moving them - Laravel -
i have form has 5 file inputs create array of images.
when processing, wish loop through images , process them.
$images = input::get('images'); // image proccessing foreach ($images $image) {   print_r($image); } that output file name, if call move function on $image variable "method move called on string".
how should doing this?
you should doing          $input = input::file('files'); //get file input         //check if input has file          if ($input){             foreach($input $key){             //loop through file , perform action...               $array = image::file_upload($key, 'file', 'images');               // assume have method upload above               $key = $array['filename'];               print_r($key);                 }         }         $this->image->save($input); //save db file name. 
Comments
Post a Comment