{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_176/pulls/comments/75798896","id":75798896,"diff_hunk":"@@ -0,0 +1,27 @@\n+<?php\n+namespace App\\Repositories\\Category;\n+\n+use Auth;\n+use App\\Models\\Answer;\n+use App\\Models\\Result;\n+use App\\Models\\Lesson;\n+use App\\Models\\Category;\n+use App\\Models\\Word;\n+use App\\Repositories\\BaseRepository;\n+\n+class CategoryRepository extends BaseRepository\n+{\n+    public function __construct(Category $category)\n+    {\n+        $this->model = $category;\n+    }\n+\n+    public function countLearnedWord($categories)\n+    {\n+        foreach ($categories as $category) {\n+            $countLeanred = count(Answer::whereIn('id', Result::whereIn('lesson_id', Lesson::where('category_id', $category->id)->where('user_id', Auth::user()->id)->pluck('id'))->pluck('answer_id'))->where('is_correct', 1)->get());","path":"app/Repositories/Category/CategoryRepository.php","position":22,"original_position":22,"commit_id":"600bde29fff8a085569fd184d4324f82494370f9","original_commit_id":"600bde29fff8a085569fd184d4324f82494370f9","user":{"login":"NgTheThao","id":11207197,"avatar_url":"https://avatars.githubusercontent.com/u/11207197?v=3","gravatar_id":"","url":"https://api.github.com/users/NgTheThao","html_url":"https://github.com/NgTheThao","followers_url":"https://api.github.com/users/NgTheThao/followers","following_url":"https://api.github.com/users/NgTheThao/following{/other_user}","gists_url":"https://api.github.com/users/NgTheThao/gists{/gist_id}","starred_url":"https://api.github.com/users/NgTheThao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NgTheThao/subscriptions","organizations_url":"https://api.github.com/users/NgTheThao/orgs","repos_url":"https://api.github.com/users/NgTheThao/repos","events_url":"https://api.github.com/users/NgTheThao/events{/privacy}","received_events_url":"https://api.github.com/users/NgTheThao/received_events","type":"User","site_admin":false},"body":"em dùng repository thay vì eloquent ở chỗ này nhé","created_at":"2016-08-23T03:46:38Z","updated_at":"2016-08-23T03:46:38Z","html_url":"https://github.com/framgia/fels_176/pull/18#discussion_r75798896","pull_request_url":"https://api.github.com/repos/framgia/fels_176/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_176/pulls/comments/75798896"},"html":{"href":"https://github.com/framgia/fels_176/pull/18#discussion_r75798896"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_176/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_176/pulls/18","id":81753274,"html_url":"https://github.com/framgia/fels_176/pull/18","diff_url":"https://github.com/framgia/fels_176/pull/18.diff","patch_url":"https://github.com/framgia/fels_176/pull/18.patch","issue_url":"https://api.github.com/repos/framgia/fels_176/issues/18","number":18,"state":"open","locked":false,"title":"show word list and category","user":{"login":"trandinhvi39","id":13941707,"avatar_url":"https://avatars.githubusercontent.com/u/13941707?v=3","gravatar_id":"","url":"https://api.github.com/users/trandinhvi39","html_url":"https://github.com/trandinhvi39","followers_url":"https://api.github.com/users/trandinhvi39/followers","following_url":"https://api.github.com/users/trandinhvi39/following{/other_user}","gists_url":"https://api.github.com/users/trandinhvi39/gists{/gist_id}","starred_url":"https://api.github.com/users/trandinhvi39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trandinhvi39/subscriptions","organizations_url":"https://api.github.com/users/trandinhvi39/orgs","repos_url":"https://api.github.com/users/trandinhvi39/repos","events_url":"https://api.github.com/users/trandinhvi39/events{/privacy}","received_events_url":"https://api.github.com/users/trandinhvi39/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-18T03:49:51Z","updated_at":"2016-08-23T03:46:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58ac7ffbd11d40eeca0cc9d2fd08f964d5364372","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_176/pulls/18/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_176/pulls/18/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_176/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_176/issues/18/comments","statuses_url":"https://api.github.com/repos/framgia/fels_176/statuses/600bde29fff8a085569fd184d4324f82494370f9","head":{"label":"trandinhvi39:init","ref":"init","sha":"600bde29fff8a085569fd184d4324f82494370f9","user":{"login":"trandinhvi39","id":13941707,"avatar_url":"https://avatars.githubusercontent.com/u/13941707?v=3","gravatar_id":"","url":"https://api.github.com/users/trandinhvi39","html_url":"https://github.com/trandinhvi39","followers_url":"https://api.github.com/users/trandinhvi39/followers","following_url":"https://api.github.com/users/trandinhvi39/following{/other_user}","gists_url":"https://api.github.com/users/trandinhvi39/gists{/gist_id}","starred_url":"https://api.github.com/users/trandinhvi39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trandinhvi39/subscriptions","organizations_url":"https://api.github.com/users/trandinhvi39/orgs","repos_url":"https://api.github.com/users/trandinhvi39/repos","events_url":"https://api.github.com/users/trandinhvi39/events{/privacy}","received_events_url":"https://api.github.com/users/trandinhvi39/received_events","type":"User","site_admin":false},"repo":{"id":64834836,"name":"fels_176","full_name":"trandinhvi39/fels_176","owner":{"login":"trandinhvi39","id":13941707,"avatar_url":"https://avatars.githubusercontent.com/u/13941707?v=3","gravatar_id":"","url":"https://api.github.com/users/trandinhvi39","html_url":"https://github.com/trandinhvi39","followers_url":"https://api.github.com/users/trandinhvi39/followers","following_url":"https://api.github.com/users/trandinhvi39/following{/other_user}","gists_url":"https://api.github.com/users/trandinhvi39/gists{/gist_id}","starred_url":"https://api.github.com/users/trandinhvi39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trandinhvi39/subscriptions","organizations_url":"https://api.github.com/users/trandinhvi39/orgs","repos_url":"https://api.github.com/users/trandinhvi39/repos","events_url":"https://api.github.com/users/trandinhvi39/events{/privacy}","received_events_url":"https://api.github.com/users/trandinhvi39/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trandinhvi39/fels_176","description":"Framgia E Learning System (Training)","fork":true,"url":"https://api.github.com/repos/trandinhvi39/fels_176","forks_url":"https://api.github.com/repos/trandinhvi39/fels_176/forks","keys_url":"https://api.github.com/repos/trandinhvi39/fels_176/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trandinhvi39/fels_176/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trandinhvi39/fels_176/teams","hooks_url":"https://api.github.com/repos/trandinhvi39/fels_176/hooks","issue_events_url":"https://api.github.com/repos/trandinhvi39/fels_176/issues/events{/number}","events_url":"https://api.github.com/repos/trandinhvi39/fels_176/events","assignees_url":"https://api.github.com/repos/trandinhvi39/fels_176/assignees{/user}","branches_url":"https://api.github.com/repos/trandinhvi39/fels_176/branches{/branch}","tags_url":"https://api.github.com/repos/trandinhvi39/fels_176/tags","blobs_url":"https://api.github.com/repos/trandinhvi39/fels_176/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trandinhvi39/fels_176/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trandinhvi39/fels_176/git/refs{/sha}","trees_url":"https://api.github.com/repos/trandinhvi39/fels_176/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trandinhvi39/fels_176/statuses/{sha}","languages_url":"https://api.github.com/repos/trandinhvi39/fels_176/languages","stargazers_url":"https://api.github.com/repos/trandinhvi39/fels_176/stargazers","contributors_url":"https://api.github.com/repos/trandinhvi39/fels_176/contributors","subscribers_url":"https://api.github.com/repos/trandinhvi39/fels_176/subscribers","subscription_url":"https://api.github.com/repos/trandinhvi39/fels_176/subscription","commits_url":"https://api.github.com/repos/trandinhvi39/fels_176/commits{/sha}","git_commits_url":"https://api.github.com/repos/trandinhvi39/fels_176/git/commits{/sha}","comments_url":"https://api.github.com/repos/trandinhvi39/fels_176/comments{/number}","issue_comment_url":"https://api.github.com/repos/trandinhvi39/fels_176/issues/comments{/number}","contents_url":"https://api.github.com/repos/trandinhvi39/fels_176/contents/{+path}","compare_url":"https://api.github.com/repos/trandinhvi39/fels_176/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trandinhvi39/fels_176/merges","archive_url":"https://api.github.com/repos/trandinhvi39/fels_176/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trandinhvi39/fels_176/downloads","issues_url":"https://api.github.com/repos/trandinhvi39/fels_176/issues{/number}","pulls_url":"https://api.github.com/repos/trandinhvi39/fels_176/pulls{/number}","milestones_url":"https://api.github.com/repos/trandinhvi39/fels_176/milestones{/number}","notifications_url":"https://api.github.com/repos/trandinhvi39/fels_176/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trandinhvi39/fels_176/labels{/name}","releases_url":"https://api.github.com/repos/trandinhvi39/fels_176/releases{/id}","deployments_url":"https://api.github.com/repos/trandinhvi39/fels_176/deployments","created_at":"2016-08-03T09:50:39Z","updated_at":"2016-08-03T09:11:31Z","pushed_at":"2016-08-18T08:04:11Z","git_url":"git://github.com/trandinhvi39/fels_176.git","ssh_url":"git@github.com:trandinhvi39/fels_176.git","clone_url":"https://github.com/trandinhvi39/fels_176.git","svn_url":"https://github.com/trandinhvi39/fels_176","homepage":null,"size":73,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"688ee8f8f3c617261b5c9413cfddc95f825a6d47","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","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":64832172,"name":"fels_176","full_name":"framgia/fels_176","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","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/fels_176","description":"Framgia E Learning System (Training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_176","forks_url":"https://api.github.com/repos/framgia/fels_176/forks","keys_url":"https://api.github.com/repos/framgia/fels_176/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_176/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_176/teams","hooks_url":"https://api.github.com/repos/framgia/fels_176/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_176/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_176/events","assignees_url":"https://api.github.com/repos/framgia/fels_176/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_176/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_176/tags","blobs_url":"https://api.github.com/repos/framgia/fels_176/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_176/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_176/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_176/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_176/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_176/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_176/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_176/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_176/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_176/subscription","commits_url":"https://api.github.com/repos/framgia/fels_176/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_176/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_176/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_176/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_176/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_176/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_176/merges","archive_url":"https://api.github.com/repos/framgia/fels_176/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_176/downloads","issues_url":"https://api.github.com/repos/framgia/fels_176/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_176/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_176/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_176/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_176/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_176/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fels_176/deployments","created_at":"2016-08-03T09:11:31Z","updated_at":"2016-08-09T06:45:02Z","pushed_at":"2016-08-18T08:04:12Z","git_url":"git://github.com/framgia/fels_176.git","ssh_url":"git@github.com:framgia/fels_176.git","clone_url":"https://github.com/framgia/fels_176.git","svn_url":"https://github.com/framgia/fels_176","homepage":null,"size":304,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_176/pulls/18"},"html":{"href":"https://github.com/framgia/fels_176/pull/18"},"issue":{"href":"https://api.github.com/repos/framgia/fels_176/issues/18"},"comments":{"href":"https://api.github.com/repos/framgia/fels_176/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_176/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_176/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_176/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_176/statuses/600bde29fff8a085569fd184d4324f82494370f9"}}}}
{"actor":{"display_login":"NgTheThao"}}