protected function mapUpdatedPictures($current)
	{
		$this->deleteCurrentFiles($current);

		return $this->files()->flatMap(function ($item, $key) {
			$files[] = [
				'id' => $key,
				'path' => $item->store($this->directory)
			];

			return $files;
		})->all();
	}
protected function mapUpdatedPictures($current)
	{
		$this->deleteCurrentFiles($current);

		return $this->files()->flatMap(function ($item, $key) {
			$files[] = [
				'id' => $key,
				'path' => $item->store($this->directory)
			];

			return $files;
		})->all();
	}
protected function mapUpdatedPictures ( $ current ) { $ this -> deleteCurrentFiles ( $ current ) ; return $ this -> files ( ) -> flatMap ( function ( $ item , $ key ) { $ files [ ] = [ 'id' => $ key , 'path' => $ item -> store ( $ this -> directory ) ] ; return $ files ; } ) -> all ( ) ; }
Map the updated pictures.

@param $current Collection

@return string|array
Map the updated pictures .