app/Http/Controllers/TaskController.php
/**
     * Update the specified resource in storage.
     *
     * @param \Illuminate\Http\Request $request
     * @param \App\Models\Task $task
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Task $task)
    {
        $task->done = !$task->done;
        $task->save();
        return redirect()->route('index');
    }
public function update ( Request $ request , Task $ task ) { $ task -> done = ! $ task -> done ; $ task -> save ( ) ; return redirect ( ) -> route ( 'index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .