{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_120/pulls/comments/55783705","id":55783705,"diff_hunk":"@@ -0,0 +1,51 @@\n+<?php\n+\n+namespace App\\Http\\Controllers;\n+\n+use Illuminate\\Http\\Request;\n+\n+use App\\Http\\Requests;\n+use App\\Http\\Requests\\UserRequest;\n+use App\\Http\\Requests\\RegisterRequest;\n+use Auth;\n+use App\\User;\n+use Illuminate\\Support\\Facades\\Hash;\n+\n+class UserController extends Controller\n+{\n+    public function index() {\n+        return view('frontend.frontend');\n+    }\n+    public function getLogin() {\n+        return view('login.login');\n+    }\n+    public function postLogin(UserRequest $request) {\n+        $email = $request->input('email');\n+        $pass  = $request->input('password');\n+    // check email & pasword\n+        if (Auth::attempt(array('email' => $email, 'password' => $pass))) {\n+    // Check role\n+            if (Auth::user()->role == '1') {\n+                return redirect('admin/index');\n+            }\n+            else {\n+                return redirect('user/index');\n+            }\n+        }else {\n+            return view('login.login', ['messages' => trans('messages.messages')]);\n+        }\n+    }\n+    // Đăng ký tài khoản\n+    public function getregister() {\n+        return view('register.register');\n+    }\n+    public function postregister(RegisterRequest $request) {\n+        $pass=$request -> input('password');","path":"app/Http/Controllers/UserController.php","position":43,"original_position":43,"commit_id":"5517df83606815bb819fb39d2ca93f737ca081e4","original_commit_id":"5517df83606815bb819fb39d2ca93f737ca081e4","user":{"login":"xtrung","id":4641743,"avatar_url":"https://avatars.githubusercontent.com/u/4641743?v=3","gravatar_id":"","url":"https://api.github.com/users/xtrung","html_url":"https://github.com/xtrung","followers_url":"https://api.github.com/users/xtrung/followers","following_url":"https://api.github.com/users/xtrung/following{/other_user}","gists_url":"https://api.github.com/users/xtrung/gists{/gist_id}","starred_url":"https://api.github.com/users/xtrung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtrung/subscriptions","organizations_url":"https://api.github.com/users/xtrung/orgs","repos_url":"https://api.github.com/users/xtrung/repos","events_url":"https://api.github.com/users/xtrung/events{/privacy}","received_events_url":"https://api.github.com/users/xtrung/received_events","type":"User","site_admin":false},"body":"như ở comment trước, trước và sau dấu = phải có dấu cách, còn trước và sau `->` thì lại ko đc có dấu cách","created_at":"2016-03-11T02:46:14Z","updated_at":"2016-03-11T02:46:14Z","html_url":"https://github.com/framgia/fels_120/pull/4#discussion_r55783705","pull_request_url":"https://api.github.com/repos/framgia/fels_120/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_120/pulls/comments/55783705"},"html":{"href":"https://github.com/framgia/fels_120/pull/4#discussion_r55783705"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_120/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_120/pulls/4","id":62356892,"html_url":"https://github.com/framgia/fels_120/pull/4","diff_url":"https://github.com/framgia/fels_120/pull/4.diff","patch_url":"https://github.com/framgia/fels_120/pull/4.patch","issue_url":"https://api.github.com/repos/framgia/fels_120/issues/4","number":4,"state":"open","locked":false,"title":"Login_Register","user":{"login":"lehoikma","id":13901170,"avatar_url":"https://avatars.githubusercontent.com/u/13901170?v=3","gravatar_id":"","url":"https://api.github.com/users/lehoikma","html_url":"https://github.com/lehoikma","followers_url":"https://api.github.com/users/lehoikma/followers","following_url":"https://api.github.com/users/lehoikma/following{/other_user}","gists_url":"https://api.github.com/users/lehoikma/gists{/gist_id}","starred_url":"https://api.github.com/users/lehoikma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehoikma/subscriptions","organizations_url":"https://api.github.com/users/lehoikma/orgs","repos_url":"https://api.github.com/users/lehoikma/repos","events_url":"https://api.github.com/users/lehoikma/events{/privacy}","received_events_url":"https://api.github.com/users/lehoikma/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-10T08:51:40Z","updated_at":"2016-03-11T02:46:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12e46dd6504c4c8e227ed5a8f3ca8cb6d20247d3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_120/pulls/4/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_120/pulls/4/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_120/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_120/issues/4/comments","statuses_url":"https://api.github.com/repos/framgia/fels_120/statuses/5517df83606815bb819fb39d2ca93f737ca081e4","head":{"label":"lehoikma:Login_Register","ref":"Login_Register","sha":"5517df83606815bb819fb39d2ca93f737ca081e4","user":{"login":"lehoikma","id":13901170,"avatar_url":"https://avatars.githubusercontent.com/u/13901170?v=3","gravatar_id":"","url":"https://api.github.com/users/lehoikma","html_url":"https://github.com/lehoikma","followers_url":"https://api.github.com/users/lehoikma/followers","following_url":"https://api.github.com/users/lehoikma/following{/other_user}","gists_url":"https://api.github.com/users/lehoikma/gists{/gist_id}","starred_url":"https://api.github.com/users/lehoikma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehoikma/subscriptions","organizations_url":"https://api.github.com/users/lehoikma/orgs","repos_url":"https://api.github.com/users/lehoikma/repos","events_url":"https://api.github.com/users/lehoikma/events{/privacy}","received_events_url":"https://api.github.com/users/lehoikma/received_events","type":"User","site_admin":false},"repo":{"id":53475050,"name":"fels_120","full_name":"lehoikma/fels_120","owner":{"login":"lehoikma","id":13901170,"avatar_url":"https://avatars.githubusercontent.com/u/13901170?v=3","gravatar_id":"","url":"https://api.github.com/users/lehoikma","html_url":"https://github.com/lehoikma","followers_url":"https://api.github.com/users/lehoikma/followers","following_url":"https://api.github.com/users/lehoikma/following{/other_user}","gists_url":"https://api.github.com/users/lehoikma/gists{/gist_id}","starred_url":"https://api.github.com/users/lehoikma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehoikma/subscriptions","organizations_url":"https://api.github.com/users/lehoikma/orgs","repos_url":"https://api.github.com/users/lehoikma/repos","events_url":"https://api.github.com/users/lehoikma/events{/privacy}","received_events_url":"https://api.github.com/users/lehoikma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lehoikma/fels_120","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/lehoikma/fels_120","forks_url":"https://api.github.com/repos/lehoikma/fels_120/forks","keys_url":"https://api.github.com/repos/lehoikma/fels_120/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lehoikma/fels_120/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lehoikma/fels_120/teams","hooks_url":"https://api.github.com/repos/lehoikma/fels_120/hooks","issue_events_url":"https://api.github.com/repos/lehoikma/fels_120/issues/events{/number}","events_url":"https://api.github.com/repos/lehoikma/fels_120/events","assignees_url":"https://api.github.com/repos/lehoikma/fels_120/assignees{/user}","branches_url":"https://api.github.com/repos/lehoikma/fels_120/branches{/branch}","tags_url":"https://api.github.com/repos/lehoikma/fels_120/tags","blobs_url":"https://api.github.com/repos/lehoikma/fels_120/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lehoikma/fels_120/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lehoikma/fels_120/git/refs{/sha}","trees_url":"https://api.github.com/repos/lehoikma/fels_120/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lehoikma/fels_120/statuses/{sha}","languages_url":"https://api.github.com/repos/lehoikma/fels_120/languages","stargazers_url":"https://api.github.com/repos/lehoikma/fels_120/stargazers","contributors_url":"https://api.github.com/repos/lehoikma/fels_120/contributors","subscribers_url":"https://api.github.com/repos/lehoikma/fels_120/subscribers","subscription_url":"https://api.github.com/repos/lehoikma/fels_120/subscription","commits_url":"https://api.github.com/repos/lehoikma/fels_120/commits{/sha}","git_commits_url":"https://api.github.com/repos/lehoikma/fels_120/git/commits{/sha}","comments_url":"https://api.github.com/repos/lehoikma/fels_120/comments{/number}","issue_comment_url":"https://api.github.com/repos/lehoikma/fels_120/issues/comments{/number}","contents_url":"https://api.github.com/repos/lehoikma/fels_120/contents/{+path}","compare_url":"https://api.github.com/repos/lehoikma/fels_120/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lehoikma/fels_120/merges","archive_url":"https://api.github.com/repos/lehoikma/fels_120/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lehoikma/fels_120/downloads","issues_url":"https://api.github.com/repos/lehoikma/fels_120/issues{/number}","pulls_url":"https://api.github.com/repos/lehoikma/fels_120/pulls{/number}","milestones_url":"https://api.github.com/repos/lehoikma/fels_120/milestones{/number}","notifications_url":"https://api.github.com/repos/lehoikma/fels_120/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lehoikma/fels_120/labels{/name}","releases_url":"https://api.github.com/repos/lehoikma/fels_120/releases{/id}","deployments_url":"https://api.github.com/repos/lehoikma/fels_120/deployments","created_at":"2016-03-09T06:47:49Z","updated_at":"2016-03-08T03:59:07Z","pushed_at":"2016-03-10T10:26:31Z","git_url":"git://github.com/lehoikma/fels_120.git","ssh_url":"git@github.com:lehoikma/fels_120.git","clone_url":"https://github.com/lehoikma/fels_120.git","svn_url":"https://github.com/lehoikma/fels_120","homepage":null,"size":450,"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":"30a87138e78103b5235e7769e2f2378eb36cd877","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":53381102,"name":"fels_120","full_name":"framgia/fels_120","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_120","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_120","forks_url":"https://api.github.com/repos/framgia/fels_120/forks","keys_url":"https://api.github.com/repos/framgia/fels_120/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_120/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_120/teams","hooks_url":"https://api.github.com/repos/framgia/fels_120/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_120/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_120/events","assignees_url":"https://api.github.com/repos/framgia/fels_120/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_120/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_120/tags","blobs_url":"https://api.github.com/repos/framgia/fels_120/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_120/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_120/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_120/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_120/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_120/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_120/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_120/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_120/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_120/subscription","commits_url":"https://api.github.com/repos/framgia/fels_120/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_120/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_120/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_120/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_120/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_120/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_120/merges","archive_url":"https://api.github.com/repos/framgia/fels_120/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_120/downloads","issues_url":"https://api.github.com/repos/framgia/fels_120/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_120/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_120/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_120/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_120/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_120/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fels_120/deployments","created_at":"2016-03-08T03:59:07Z","updated_at":"2016-03-08T03:59:07Z","pushed_at":"2016-03-10T10:26:31Z","git_url":"git://github.com/framgia/fels_120.git","ssh_url":"git@github.com:framgia/fels_120.git","clone_url":"https://github.com/framgia/fels_120.git","svn_url":"https://github.com/framgia/fels_120","homepage":null,"size":43,"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_120/pulls/4"},"html":{"href":"https://github.com/framgia/fels_120/pull/4"},"issue":{"href":"https://api.github.com/repos/framgia/fels_120/issues/4"},"comments":{"href":"https://api.github.com/repos/framgia/fels_120/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_120/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_120/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_120/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_120/statuses/5517df83606815bb819fb39d2ca93f737ca081e4"}}}}