app/Http/Controllers/Admin/PricingController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Pricing  $pricing
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(UpdatePricingRequest $request, Pricing $pricing)
    {
        $price_data = Pricing::findOrFail($pricing->id);
        $price_data->name = $request->name;
        $price_data->pricing_description = $request->pricing_description;
        $price_data->cost = $request->cost;
        $price_data->pricing_points = $request->pricing_points;
        $price_data->save();
        return redirect(route('admin.pricing.index'))->with('success','Pricing successfully update.');
    }
public function update ( UpdatePricingRequest $ request , Pricing $ pricing ) { $ price_data = Pricing :: findOrFail ( $ pricing -> id ) ; $ price_data -> name = $ request -> name ; $ price_data -> pricing_description = $ request -> pricing_description ; $ price_data -> cost = $ request -> cost ; $ price_data -> pricing_points = $ request -> pricing_points ; $ price_data -> save ( ) ; return redirect ( route ( 'admin.pricing.index' ) ) -> with ( 'success' , 'Pricing successfully update.' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// dd($request->all());