{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fts_72/pulls/comments/89936573","pull_request_review_id":10464350,"id":89936573,"diff_hunk":"@@ -0,0 +1,146 @@\n+<?php\n+\n+namespace App\\Http\\Controllers\\Web;\n+\n+use Illuminate\\Http\\Request;\n+use App\\Repositories\\Contracts\\QuestionRepositoryInterface as QuestionRepository;\n+use App\\Repositories\\Contracts\\SubjectRepositoryInterface as SubjectRepository;\n+use App\\Repositories\\Contracts\\ExamRepositoryInterface as ExamRepository;\n+use Log;\n+use DB;\n+\n+class ExamsController extends BaseController\n+{\n+    /**\n+     * @var questionRepository\n+     *\n+     * @var subjectRepository\n+     */\n+    private $questionRepository;\n+    private $subjectRepository;\n+ \n+    public function __construct(\n+        QuestionRepository $questionRepository,\n+        SubjectRepository $subjectRepository,\n+        ExamRepository $examRepository\n+        ) {\n+ \n+        $this->questionRepository = $questionRepository;\n+        $this->subjectRepository = $subjectRepository;\n+        $this->examRepository = $examRepository;\n+        $this->viewData['title'] = trans('admin/question.title');\n+    }\n+\n+    /**\n+     * Display a listing of the resource.\n+     *\n+     * @return \\Illuminate\\Http\\Response\n+     */\n+    public function index()\n+    {\n+        $this->viewData['subjectList'] = $this->subjectRepository->lists('name', 'id');\n+        $this->viewData['examsOfUser'] = $this->examRepository->getExamsOfUser();\n+\n+        return view('web.exam.index', $this->viewData);\n+    }\n+\n+    /**\n+     * Show the form for creating a new resource.\n+     *\n+     * @return \\Illuminate\\Http\\Response\n+     */\n+    public function create()\n+    {\n+        //\n+    }\n+\n+    /**\n+     * Store a newly created resource in storage.\n+     *\n+     * @param  \\Illuminate\\Http\\Request  $request\n+     * @return \\Illuminate\\Http\\Response\n+     */\n+    public function store(Request $request)\n+    {\n+        $this->validate($request, [\n+            'subject' => 'required|in:' . $this->subjectRepository->lists('id')->implode(','),\n+        ]);","path":"app/Http/Controllers/Web/ExamsController.php","position":67,"original_position":67,"commit_id":"210324c14448a16645917c7899785a6e869a676d","original_commit_id":"210324c14448a16645917c7899785a6e869a676d","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":"ế, ko dùng cái kiểu request kia nữa à?","created_at":"2016-11-29T03:48:50Z","updated_at":"2016-11-29T03:48:50Z","html_url":"https://github.com/framgia/fts_72/pull/21#discussion_r89936573","pull_request_url":"https://api.github.com/repos/framgia/fts_72/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/framgia/fts_72/pulls/comments/89936573"},"html":{"href":"https://github.com/framgia/fts_72/pull/21#discussion_r89936573"},"pull_request":{"href":"https://api.github.com/repos/framgia/fts_72/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fts_72/pulls/21","id":95618917,"html_url":"https://github.com/framgia/fts_72/pull/21","diff_url":"https://github.com/framgia/fts_72/pull/21.diff","patch_url":"https://github.com/framgia/fts_72/pull/21.patch","issue_url":"https://api.github.com/repos/framgia/fts_72/issues/21","number":21,"state":"open","locked":false,"title":"#88762 [User] [Exam] Do Exam","user":{"login":"kopitop","id":20583689,"avatar_url":"https://avatars.githubusercontent.com/u/20583689?v=3","gravatar_id":"","url":"https://api.github.com/users/kopitop","html_url":"https://github.com/kopitop","followers_url":"https://api.github.com/users/kopitop/followers","following_url":"https://api.github.com/users/kopitop/following{/other_user}","gists_url":"https://api.github.com/users/kopitop/gists{/gist_id}","starred_url":"https://api.github.com/users/kopitop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopitop/subscriptions","organizations_url":"https://api.github.com/users/kopitop/orgs","repos_url":"https://api.github.com/users/kopitop/repos","events_url":"https://api.github.com/users/kopitop/events{/privacy}","received_events_url":"https://api.github.com/users/kopitop/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-29T03:10:11Z","updated_at":"2016-11-29T03:48:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf6964c01feb5a7e53752fad3860b103dfc4ee31","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fts_72/pulls/21/commits","review_comments_url":"https://api.github.com/repos/framgia/fts_72/pulls/21/comments","review_comment_url":"https://api.github.com/repos/framgia/fts_72/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fts_72/issues/21/comments","statuses_url":"https://api.github.com/repos/framgia/fts_72/statuses/210324c14448a16645917c7899785a6e869a676d","head":{"label":"kopitop:user_exam_do","ref":"user_exam_do","sha":"210324c14448a16645917c7899785a6e869a676d","user":{"login":"kopitop","id":20583689,"avatar_url":"https://avatars.githubusercontent.com/u/20583689?v=3","gravatar_id":"","url":"https://api.github.com/users/kopitop","html_url":"https://github.com/kopitop","followers_url":"https://api.github.com/users/kopitop/followers","following_url":"https://api.github.com/users/kopitop/following{/other_user}","gists_url":"https://api.github.com/users/kopitop/gists{/gist_id}","starred_url":"https://api.github.com/users/kopitop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopitop/subscriptions","organizations_url":"https://api.github.com/users/kopitop/orgs","repos_url":"https://api.github.com/users/kopitop/repos","events_url":"https://api.github.com/users/kopitop/events{/privacy}","received_events_url":"https://api.github.com/users/kopitop/received_events","type":"User","site_admin":false},"repo":{"id":74320341,"name":"fts_72","full_name":"kopitop/fts_72","owner":{"login":"kopitop","id":20583689,"avatar_url":"https://avatars.githubusercontent.com/u/20583689?v=3","gravatar_id":"","url":"https://api.github.com/users/kopitop","html_url":"https://github.com/kopitop","followers_url":"https://api.github.com/users/kopitop/followers","following_url":"https://api.github.com/users/kopitop/following{/other_user}","gists_url":"https://api.github.com/users/kopitop/gists{/gist_id}","starred_url":"https://api.github.com/users/kopitop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopitop/subscriptions","organizations_url":"https://api.github.com/users/kopitop/orgs","repos_url":"https://api.github.com/users/kopitop/repos","events_url":"https://api.github.com/users/kopitop/events{/privacy}","received_events_url":"https://api.github.com/users/kopitop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kopitop/fts_72","description":"Framgia Test System (training)","fork":true,"url":"https://api.github.com/repos/kopitop/fts_72","forks_url":"https://api.github.com/repos/kopitop/fts_72/forks","keys_url":"https://api.github.com/repos/kopitop/fts_72/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kopitop/fts_72/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kopitop/fts_72/teams","hooks_url":"https://api.github.com/repos/kopitop/fts_72/hooks","issue_events_url":"https://api.github.com/repos/kopitop/fts_72/issues/events{/number}","events_url":"https://api.github.com/repos/kopitop/fts_72/events","assignees_url":"https://api.github.com/repos/kopitop/fts_72/assignees{/user}","branches_url":"https://api.github.com/repos/kopitop/fts_72/branches{/branch}","tags_url":"https://api.github.com/repos/kopitop/fts_72/tags","blobs_url":"https://api.github.com/repos/kopitop/fts_72/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kopitop/fts_72/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kopitop/fts_72/git/refs{/sha}","trees_url":"https://api.github.com/repos/kopitop/fts_72/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kopitop/fts_72/statuses/{sha}","languages_url":"https://api.github.com/repos/kopitop/fts_72/languages","stargazers_url":"https://api.github.com/repos/kopitop/fts_72/stargazers","contributors_url":"https://api.github.com/repos/kopitop/fts_72/contributors","subscribers_url":"https://api.github.com/repos/kopitop/fts_72/subscribers","subscription_url":"https://api.github.com/repos/kopitop/fts_72/subscription","commits_url":"https://api.github.com/repos/kopitop/fts_72/commits{/sha}","git_commits_url":"https://api.github.com/repos/kopitop/fts_72/git/commits{/sha}","comments_url":"https://api.github.com/repos/kopitop/fts_72/comments{/number}","issue_comment_url":"https://api.github.com/repos/kopitop/fts_72/issues/comments{/number}","contents_url":"https://api.github.com/repos/kopitop/fts_72/contents/{+path}","compare_url":"https://api.github.com/repos/kopitop/fts_72/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kopitop/fts_72/merges","archive_url":"https://api.github.com/repos/kopitop/fts_72/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kopitop/fts_72/downloads","issues_url":"https://api.github.com/repos/kopitop/fts_72/issues{/number}","pulls_url":"https://api.github.com/repos/kopitop/fts_72/pulls{/number}","milestones_url":"https://api.github.com/repos/kopitop/fts_72/milestones{/number}","notifications_url":"https://api.github.com/repos/kopitop/fts_72/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kopitop/fts_72/labels{/name}","releases_url":"https://api.github.com/repos/kopitop/fts_72/releases{/id}","deployments_url":"https://api.github.com/repos/kopitop/fts_72/deployments","created_at":"2016-11-21T02:52:33Z","updated_at":"2016-11-21T01:20:30Z","pushed_at":"2016-11-29T03:28:08Z","git_url":"git://github.com/kopitop/fts_72.git","ssh_url":"git@github.com:kopitop/fts_72.git","clone_url":"https://github.com/kopitop/fts_72.git","svn_url":"https://github.com/kopitop/fts_72","homepage":null,"size":188,"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":"04289f20c1c5f823cffc60798bd6eb23050600c7","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":74314530,"name":"fts_72","full_name":"framgia/fts_72","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/fts_72","description":"Framgia Test System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fts_72","forks_url":"https://api.github.com/repos/framgia/fts_72/forks","keys_url":"https://api.github.com/repos/framgia/fts_72/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fts_72/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fts_72/teams","hooks_url":"https://api.github.com/repos/framgia/fts_72/hooks","issue_events_url":"https://api.github.com/repos/framgia/fts_72/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fts_72/events","assignees_url":"https://api.github.com/repos/framgia/fts_72/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fts_72/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fts_72/tags","blobs_url":"https://api.github.com/repos/framgia/fts_72/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fts_72/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fts_72/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fts_72/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fts_72/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fts_72/languages","stargazers_url":"https://api.github.com/repos/framgia/fts_72/stargazers","contributors_url":"https://api.github.com/repos/framgia/fts_72/contributors","subscribers_url":"https://api.github.com/repos/framgia/fts_72/subscribers","subscription_url":"https://api.github.com/repos/framgia/fts_72/subscription","commits_url":"https://api.github.com/repos/framgia/fts_72/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fts_72/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fts_72/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fts_72/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fts_72/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fts_72/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fts_72/merges","archive_url":"https://api.github.com/repos/framgia/fts_72/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fts_72/downloads","issues_url":"https://api.github.com/repos/framgia/fts_72/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fts_72/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fts_72/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fts_72/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fts_72/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fts_72/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fts_72/deployments","created_at":"2016-11-21T01:20:30Z","updated_at":"2016-11-21T01:20:30Z","pushed_at":"2016-11-29T03:28:08Z","git_url":"git://github.com/framgia/fts_72.git","ssh_url":"git@github.com:framgia/fts_72.git","clone_url":"https://github.com/framgia/fts_72.git","svn_url":"https://github.com/framgia/fts_72","homepage":null,"size":151,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fts_72/pulls/21"},"html":{"href":"https://github.com/framgia/fts_72/pull/21"},"issue":{"href":"https://api.github.com/repos/framgia/fts_72/issues/21"},"comments":{"href":"https://api.github.com/repos/framgia/fts_72/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fts_72/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fts_72/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fts_72/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fts_72/statuses/210324c14448a16645917c7899785a6e869a676d"}}}}
{"actor":{"display_login":"NgTheThao"}}