public function getProductVariantComboSelectImg() { $input = Input::all(); $pid = $input['pid']; $piid = $input['piid']; $ProductInfo = ProductInfo::where('id', '=', $piid)->where('product_status', '=', '9')->get(); foreach ($ProductInfo as $info) { $name = $info->product_name; $store_name = $info->store->store_name; } $listFiles = []; $files = \File::files('assets/img/store/' . $store_name . '/product/' . $pid); foreach ($files as $path) { $listFiles[] = pathinfo($path); } return $listFiles; }