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)
    {
        $success = $this->task_service->destroy($task, auth()->user()->id);
        return response()->json(['success' => $success]);
    }
public function destroy ( Task $ task ) { $ success = $ this -> task_service -> destroy ( $ task , auth ( ) -> user ( ) -> id ) ; return response ( ) -> json ( [ 'success' => $ success ] ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .