app/Http/Controllers/ProductReviewController.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)
    {
        $review=ProductReview::find($id);
        if($review){
            $data=$request->all();
            $status=$review->fill($data)->update();
            if($status){
                request()->session()->flash('success','Review Successfully updated');
            }
            else{
                request()->session()->flash('error','Something went wrong! Please try again!!');
            }
        }
        else{
            request()->session()->flash('error','Review not found!!');
        }
        return redirect()->route('review.index');
    }
public function update ( Request $ request , $ id ) { $ review = ProductReview :: find ( $ id ) ; if ( $ review ) { $ data = $ request -> all ( ) ; $ status = $ review -> fill ( $ data ) -> update ( ) ; if ( $ status ) { request ( ) -> session ( ) -> flash ( 'success' , 'Review Successfully updated' ) ; } else { request ( ) -> session ( ) -> flash ( 'error' , 'Something went wrong! Please try again!!' ) ; } } else { request ( ) -> session ( ) -> flash ( 'error' , 'Review not found!!' ) ; } return redirect ( ) -> route ( 'review.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// $product_info=Product::getProductBySlug($request->slug); //  return $product_info; // return $request->all(); // $user=User::where('role','admin')->get(); // return $user; // $details=[ //     'title'=>'Update Product Rating!', //     'actionURL'=>route('product-detail',$product_info->id), //     'fas'=>'fa-star' // ]; // Notification::send($user,new StatusNotification($details));