{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/servey_01/pulls/comments/189798685","pull_request_review_id":122045033,"id":189798685,"diff_hunk":"@@ -171,4 +174,30 @@ public function getResultChoiceQuestion($question)\n             'total_answer_results' => $totalAnswerResults,\n         ];\n     }\n+\n+    public function getAllIdDataSurvey($survey) {\n+        $idSections = $survey->sections->pluck('id')->all();\n+        $idQuestions = $this->questionRepository->withTrashed()->whereIn('section_id', $idSections)->pluck('id')->all();\n+        $idAnswers = $this->answerRepository->withTrashed()->whereIn('question_id', $idQuestions)->pluck('id')->all();\n+        $idSettings = $this->settingRepository->withTrashed()\n+            ->whereIn('settingable_type', [Answer::class, Question::class, Survey::class])\n+            ->whereIn('settingable_id', array_merge($idQuestions, $idAnswers, [$survey->id]))\n+            ->pluck('id')->all();\n+        $idMedias = $this->mediaRepository->withTrashed()\n+            ->whereIn('mediable_type', [Question::class, Answer::class])\n+            ->whereIn('mediable_id', array_merge($idQuestions, $idAnswers))\n+            ->pluck('id')->all();","path":"app/Traits/SurveyProcesser.php","position":26,"original_position":26,"commit_id":"5b23f841bb1d35dfb3f82d4aca9f93c2a1d39020","original_commit_id":"5b23f841bb1d35dfb3f82d4aca9f93c2a1d39020","user":{"login":"trangkarol","id":19767833,"avatar_url":"https://avatars1.githubusercontent.com/u/19767833?v=4","gravatar_id":"","url":"https://api.github.com/users/trangkarol","html_url":"https://github.com/trangkarol","followers_url":"https://api.github.com/users/trangkarol/followers","following_url":"https://api.github.com/users/trangkarol/following{/other_user}","gists_url":"https://api.github.com/users/trangkarol/gists{/gist_id}","starred_url":"https://api.github.com/users/trangkarol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trangkarol/subscriptions","organizations_url":"https://api.github.com/users/trangkarol/orgs","repos_url":"https://api.github.com/users/trangkarol/repos","events_url":"https://api.github.com/users/trangkarol/events{/privacy}","received_events_url":"https://api.github.com/users/trangkarol/received_events","type":"User","site_admin":false},"body":"sao code sql lại nằm ở đây đưa vào repo đi e ơi","created_at":"2018-05-22T07:22:08Z","updated_at":"2018-05-22T07:22:13Z","html_url":"https://github.com/framgia/servey_01/pull/274#discussion_r189798685","pull_request_url":"https://api.github.com/repos/framgia/servey_01/pulls/274","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/comments/189798685"},"html":{"href":"https://github.com/framgia/servey_01/pull/274#discussion_r189798685"},"pull_request":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/274"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/servey_01/pulls/274","id":189556327,"html_url":"https://github.com/framgia/servey_01/pull/274","diff_url":"https://github.com/framgia/servey_01/pull/274.diff","patch_url":"https://github.com/framgia/servey_01/pull/274.patch","issue_url":"https://api.github.com/repos/framgia/servey_01/issues/274","number":274,"state":"open","locked":false,"title":"edit create result, add soft delete","user":{"login":"nguyenhathanh2212","id":18241956,"avatar_url":"https://avatars1.githubusercontent.com/u/18241956?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenhathanh2212","html_url":"https://github.com/nguyenhathanh2212","followers_url":"https://api.github.com/users/nguyenhathanh2212/followers","following_url":"https://api.github.com/users/nguyenhathanh2212/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhathanh2212/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhathanh2212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhathanh2212/subscriptions","organizations_url":"https://api.github.com/users/nguyenhathanh2212/orgs","repos_url":"https://api.github.com/users/nguyenhathanh2212/repos","events_url":"https://api.github.com/users/nguyenhathanh2212/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhathanh2212/received_events","type":"User","site_admin":false},"body":"Redmine : https://dev.framgia.com/redmine/issues/173375","created_at":"2018-05-22T06:09:10Z","updated_at":"2018-05-22T07:22:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ddc67dea1ec7cdd057f9a60d562ef77233bb008","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/servey_01/pulls/274/commits","review_comments_url":"https://api.github.com/repos/framgia/servey_01/pulls/274/comments","review_comment_url":"https://api.github.com/repos/framgia/servey_01/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/servey_01/issues/274/comments","statuses_url":"https://api.github.com/repos/framgia/servey_01/statuses/5b23f841bb1d35dfb3f82d4aca9f93c2a1d39020","head":{"label":"nguyenhathanh2212:close-open-delete-survey","ref":"close-open-delete-survey","sha":"5b23f841bb1d35dfb3f82d4aca9f93c2a1d39020","user":{"login":"nguyenhathanh2212","id":18241956,"avatar_url":"https://avatars1.githubusercontent.com/u/18241956?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenhathanh2212","html_url":"https://github.com/nguyenhathanh2212","followers_url":"https://api.github.com/users/nguyenhathanh2212/followers","following_url":"https://api.github.com/users/nguyenhathanh2212/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhathanh2212/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhathanh2212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhathanh2212/subscriptions","organizations_url":"https://api.github.com/users/nguyenhathanh2212/orgs","repos_url":"https://api.github.com/users/nguyenhathanh2212/repos","events_url":"https://api.github.com/users/nguyenhathanh2212/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhathanh2212/received_events","type":"User","site_admin":false},"repo":{"id":126939046,"name":"servey_01","full_name":"nguyenhathanh2212/servey_01","owner":{"login":"nguyenhathanh2212","id":18241956,"avatar_url":"https://avatars1.githubusercontent.com/u/18241956?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenhathanh2212","html_url":"https://github.com/nguyenhathanh2212","followers_url":"https://api.github.com/users/nguyenhathanh2212/followers","following_url":"https://api.github.com/users/nguyenhathanh2212/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhathanh2212/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhathanh2212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhathanh2212/subscriptions","organizations_url":"https://api.github.com/users/nguyenhathanh2212/orgs","repos_url":"https://api.github.com/users/nguyenhathanh2212/repos","events_url":"https://api.github.com/users/nguyenhathanh2212/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhathanh2212/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nguyenhathanh2212/servey_01","description":null,"fork":true,"url":"https://api.github.com/repos/nguyenhathanh2212/servey_01","forks_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/forks","keys_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/teams","hooks_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/hooks","issue_events_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/issues/events{/number}","events_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/events","assignees_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/assignees{/user}","branches_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/branches{/branch}","tags_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/tags","blobs_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/statuses/{sha}","languages_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/languages","stargazers_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/stargazers","contributors_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/contributors","subscribers_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/subscribers","subscription_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/subscription","commits_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/contents/{+path}","compare_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/merges","archive_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/downloads","issues_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/issues{/number}","pulls_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/pulls{/number}","milestones_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/milestones{/number}","notifications_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/labels{/name}","releases_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/releases{/id}","deployments_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/deployments","created_at":"2018-03-27T06:24:45Z","updated_at":"2018-03-27T06:24:47Z","pushed_at":"2018-05-22T06:59:25Z","git_url":"git://github.com/nguyenhathanh2212/servey_01.git","ssh_url":"git@github.com:nguyenhathanh2212/servey_01.git","clone_url":"https://github.com/nguyenhathanh2212/servey_01.git","svn_url":"https://github.com/nguyenhathanh2212/servey_01","homepage":null,"size":19236,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"framgia:improve_view","ref":"improve_view","sha":"3f80035bc3d5ff7fb406eff2a669b04375733867","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":78068076,"name":"servey_01","full_name":"framgia/servey_01","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/servey_01","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/servey_01","forks_url":"https://api.github.com/repos/framgia/servey_01/forks","keys_url":"https://api.github.com/repos/framgia/servey_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/servey_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/servey_01/teams","hooks_url":"https://api.github.com/repos/framgia/servey_01/hooks","issue_events_url":"https://api.github.com/repos/framgia/servey_01/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/servey_01/events","assignees_url":"https://api.github.com/repos/framgia/servey_01/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/servey_01/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/servey_01/tags","blobs_url":"https://api.github.com/repos/framgia/servey_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/servey_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/servey_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/servey_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/servey_01/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/servey_01/languages","stargazers_url":"https://api.github.com/repos/framgia/servey_01/stargazers","contributors_url":"https://api.github.com/repos/framgia/servey_01/contributors","subscribers_url":"https://api.github.com/repos/framgia/servey_01/subscribers","subscription_url":"https://api.github.com/repos/framgia/servey_01/subscription","commits_url":"https://api.github.com/repos/framgia/servey_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/servey_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/servey_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/servey_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/servey_01/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/servey_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/servey_01/merges","archive_url":"https://api.github.com/repos/framgia/servey_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/servey_01/downloads","issues_url":"https://api.github.com/repos/framgia/servey_01/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/servey_01/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/servey_01/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/servey_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/servey_01/labels{/name}","releases_url":"https://api.github.com/repos/framgia/servey_01/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/servey_01/deployments","created_at":"2017-01-05T01:37:19Z","updated_at":"2018-03-29T02:58:47Z","pushed_at":"2018-05-22T06:59:27Z","git_url":"git://github.com/framgia/servey_01.git","ssh_url":"git@github.com:framgia/servey_01.git","clone_url":"https://github.com/framgia/servey_01.git","svn_url":"https://github.com/framgia/servey_01","homepage":null,"size":19231,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":13,"open_issues":2,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/274"},"html":{"href":"https://github.com/framgia/servey_01/pull/274"},"issue":{"href":"https://api.github.com/repos/framgia/servey_01/issues/274"},"comments":{"href":"https://api.github.com/repos/framgia/servey_01/issues/274/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/274/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/274/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/servey_01/statuses/5b23f841bb1d35dfb3f82d4aca9f93c2a1d39020"}},"author_association":"NONE"}}
{"actor":{"display_login":"trangkarol"}}