app/Http/Controllers/OfferController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $offer = Offer::find($id);
        $update_offer = array(
            'name' => $request->name,
            'discount' => $request->discount,
            'discount_type' => $request->discount_type,
            'status' => $request->status
        );
        $offer->update($update_offer);
        return redirect('admin/offers');
    }
public function update ( Request $ request , $ id ) { $ offer = Offer :: find ( $ id ) ; $ update_offer = array ( 'name' => $ request -> name , 'discount' => $ request -> discount , 'discount_type' => $ request -> discount_type , 'status' => $ request -> status ) ; $ offer -> update ( $ update_offer ) ; return redirect ( 'admin/offers' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .