dimanche 31 décembre 2017

php - why I got this error message [duplicate]

This question already has an answer here:

ErrorException in 6e75a716e51c7050c348f50296e9bf83b3c3c282.php line 36: Undefined property: stdClass::$product_zoom_imagee (View: /var/www/vhost/arabtjk/resources/views/front/tijik/product_info.blade.php)

I edited the controller to insert one new image for the products into DB I inserted the product to test, its working, I can see the image name inside the filed that I created, Now, I should call the image as the previous developer did, I edited the product_info.blade.php from views directory and I putted the same code for the previous images but i changed the name as I putted it in the DB

Like this: this is the previous code for the existing images

<?php  if(file_exists(base_path().'/public/assets/admin/base/images/products/detail/'.$product->product_info_image) && $product->product_info_image!='') 
{ ?>
<a href="<?php echo url('/assets/admin/base/images/products/detail/'.$product->product_info_image.''); ?>" title=""> <img  title="" alt=""  src="<?php echo url('/assets/admin/base/images/products/detail/'.$product->product_info_image.''); ?>" ></a>
<?php } 
else{  
?>
<a href="" title=""><img src="" alt=""></a>
<?php } ?>

<?php  if(file_exists(base_path().'/public/assets/admin/base/images/products/zoom/'.$product->product_zoom_image) && $product->product_zoom_image!='') 
{ ?>
<a href="<?php echo url('/assets/admin/base/images/products/zoom/'.$product->product_zoom_image.''); ?>" title=""> <img  title="" alt=""  src="<?php echo url('/assets/admin/base/images/products/zoom/'.$product->product_zoom_image.''); ?>" ></a>
<?php } 
else{  ?>
<a href="" title=""><img src="" alt=""></a>
<?php } ?>

I inserted this to call the new image:

<?php  if(file_exists(base_path().'/public/assets/admin/base/images/products/zoom/'.$product->product_zoom_imagee) && $product->product_zoom_imagee!='') 
{ ?>
<a href="<?php echo url('/assets/admin/base/images/products/zoom/'.$product->product_zoom_imagee.''); ?>" title=""> <img  title="" alt=""  src="<?php echo url('/assets/admin/base/images/products/zoom/'.$product->product_zoom_imagee.''); ?>" ></a>
<?php } else{  ?>
<a href="" title=""><img src="" alt=""></a>
<?php } ?>

But I got that error.

Note, I am a beginner in Laravel programming, I dont know, maybe I should edit some other files

can any one guide me to solve this issue,

Many thanks for all



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire