app/Http/Controllers/ReminderController.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)
    {
        $validatedData = $request->validate([
            'client_id' => 'required',
            'mobile' => 'required',
            'email' => 'required',
            'end_date' => 'required',
        ]);
        Reminder::find($id)->update([
            'client_id' => $request->client_id,
            'mobile' => json_encode($request->mobile),
            'email' => json_encode($request->email),
            'message' => $request->message,
            'end_date' => $request->end_date,
            'status' => $request->status,
        ]);
        return redirect()->route('reminders.index');
    }
public function update ( Request $ request , $ id ) { $ validatedData = $ request -> validate ( [ 'client_id' => 'required' , 'mobile' => 'required' , 'email' => 'required' , 'end_date' => 'required' , ] ) ; Reminder :: find ( $ id ) -> update ( [ 'client_id' => $ request -> client_id , 'mobile' => json_encode ( $ request -> mobile ) , 'email' => json_encode ( $ request -> email ) , 'message' => $ request -> message , 'end_date' => $ request -> end_date , 'status' => $ request -> status , ] ) ; return redirect ( ) -> route ( 'reminders.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .