app/Http/Controllers/Admin/leavetypeController.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(LeaveTypeValidator $request, $id)
    {
        $data= $request->all();
        $leavetypes = LeaveTypes::findorfail($id);
        $leavetypes->update($data);
        return redirect()->route('leavetype.index')->with ('success', 'Leave Types Updated Successfully');
    }
public function update ( LeaveTypeValidator $ request , $ id ) { $ data = $ request -> all ( ) ; $ leavetypes = LeaveTypes :: findorfail ( $ id ) ; $ leavetypes -> update ( $ data ) ; return redirect ( ) -> route ( 'leavetype.index' ) -> with ( 'success' , 'Leave Types Updated Successfully' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .