app/Http/Controllers/TheCartController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
     Cart::add($request->id, $request->title, 1, $request->price)
     ->associate('App\Product');
     $Bidderprice = $request->Bidderprice;
      $request->session()->put('Bidderprice', $Bidderprice);
     return redirect()->route('cart.index',$request->slug)->with('success', 'Congratulations! You Won this Auction');
    }
public function store ( Request $ request ) { Cart :: add ( $ request -> id , $ request -> title , 1 , $ request -> price ) -> associate ( 'App\Product' ) ; $ Bidderprice = $ request -> Bidderprice ; $ request -> session ( ) -> put ( 'Bidderprice' , $ Bidderprice ) ; return redirect ( ) -> route ( 'cart.index' , $ request -> slug ) -> with ( 'success' , 'Congratulations! You Won this Auction' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// $Bidderprice = []; //$user = Auth::user()->id; // $product = Product::find($request->id); // $request->session()->forget('Bidderprice'); // print_r($request->input()); /*change it to the condition of higher price + timer end */ // dd( $Bidderprice); //->with(['Bidderprice' => $Bidderprice]);