app/Http/Controllers/ordersController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function saveReview(Request $request)
    {
        $user_id = Auth::user()->id;
        $orderItemId=$request->orderItemId;
        $starValue=$request->starValue;
        $review=$request->review;
        $feedback=new Feedback();
        $feedback->orderItem_id=$orderItemId;
        $feedback->rating=$starValue;
        $feedback->user_id=$user_id;
        $feedback->description=$review;
        $feedback->feedbackType="Review";
        $feedback->save();
        return "feedback added Successfully";
     }
public function saveReview ( Request $ request ) { $ user_id = Auth :: user ( ) -> id ; $ orderItemId = $ request -> orderItemId ; $ starValue = $ request -> starValue ; $ review = $ request -> review ; $ feedback = new Feedback ( ) ; $ feedback -> orderItem_id = $ orderItemId ; $ feedback -> rating = $ starValue ; $ feedback -> user_id = $ user_id ; $ feedback -> description = $ review ; $ feedback -> feedbackType = " Review " ; $ feedback -> save ( ) ; return " feedback added Successfully " ; }
Show the form for creating a new resource.
Show the form for creating a new resource .