app/Http/Controllers/TaskController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Task  $task
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $this->validate($request, [
        'updatedTaskName' => 'required|min:5|max:255',
        ]);
        $task = Task::findOrFail($id);
        $task->name = $request->updatedTaskName;
        $task->save();
        return redirect()->route('tasks.index');
    }
public function update ( Request $ request , $ id ) { $ this -> validate ( $ request , [ 'updatedTaskName' => 'required|min:5|max:255' , ] ) ; $ task = Task :: findOrFail ( $ id ) ; $ task -> name = $ request -> updatedTaskName ; $ task -> save ( ) ; return redirect ( ) -> route ( 'tasks.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .