app/Http/Controllers/TaskController.php
/**
     * Remove the specified resource from storage.
     *
     * @param \App\Models\Task $task
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Task $task)
    {
        $task->delete();
        return redirect()->route('index');
    }
public function destroy ( Task $ task ) { $ task -> delete ( ) ; return redirect ( ) -> route ( 'index' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .