Beispiel #1
0
 public function getCurrentPrice($id)
 {
     $price = Price_History::where('products_id', $id)->first();
     return $price->price;
 }
 public function deleteYourProducts($id)
 {
     $deleteProductPrice = UserPrice::where('product_id', $id)->delete();
     $deletePriceHistory = Price_History::where('products_id', $id)->delete();
     $deleteUserProduct = User_Product::where('products_id', $id)->delete();
     $deleteProduct = Product::find($id)->delete();
     Session::flash('delete-product', 'Product Deleted Successfully..!!');
     return Redirect::route('update-your-products');
 }