public function getDelete($id) {
         
        if(Request::ajax()){
            $task = Task::whereId($id)->first();
            $task->delete();
            return "OK";
        }
    }
    public function getDone($id) {
         
        if(Request::ajax()){
            $task = Task::find($id);
            $task->status = 1;
            $task->save();
            return "OK";
        }
    }
Hosted with ❤ by CODENEXT view on codenext