app/Http/Controllers/Admin/ReportController.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)
    {
        $cradits = cradits::find($id);
        $cradits->user_id = $request->user;
        $cradits->cradit = $request->cradit;
        $cradits->date = $request->date;
        $cradits->cost = $request->cost;
        $cradits->remarks = $request->remarks;
        $cradits->image = $request->image;
        $cradits->save();
        return redirect()->route('report.index')->with('message','Record Updated Successfully');
    }
public function update ( Request $ request , $ id ) { $ cradits = cradits :: find ( $ id ) ; $ cradits -> user_id = $ request -> user ; $ cradits -> cradit = $ request -> cradit ; $ cradits -> date = $ request -> date ; $ cradits -> cost = $ request -> cost ; $ cradits -> remarks = $ request -> remarks ; $ cradits -> image = $ request -> image ; $ cradits -> save ( ) ; return redirect ( ) -> route ( 'report.index' ) -> with ( 'message' , 'Record Updated Successfully' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .