{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_170/pulls/comments/75621817","id":75621817,"diff_hunk":"@@ -84,16 +92,40 @@ public function edit($id)\n      */\n     public function update(Request $request)\n     {\n-        $user = User::find($request->id);\n-        if ($user == NULL) {\n-            return redirect('/');\n+        $validate = Validator::make($request->all(),\n+            ['name' => 'min:6|max:25']);\n+\n+        if ($validate->fails()) {\n+            return back()->with('fail', 'Update Profile Fail');\n         }\n \n-        $user->update([\n-            'name' => $request->name,\n-            'email' => $request->email,\n-        ]);\n-        return redirect(url(\"/user/$request->id\"));\n+        $img = $request->file('avatar');\n+\n+        if (User::find($request->id) == null) {\n+            return back()->with('fail', 'Not found data :(');\n+        } else {\n+","path":"app/Http/Controllers/UserController.php","position":63,"original_position":63,"commit_id":"7d6741620b1f7e39a10809c43d56a1e56f344235","original_commit_id":"7d6741620b1f7e39a10809c43d56a1e56f344235","user":{"login":"DoanhPHAM","id":9796244,"avatar_url":"https://avatars.githubusercontent.com/u/9796244?v=3","gravatar_id":"","url":"https://api.github.com/users/DoanhPHAM","html_url":"https://github.com/DoanhPHAM","followers_url":"https://api.github.com/users/DoanhPHAM/followers","following_url":"https://api.github.com/users/DoanhPHAM/following{/other_user}","gists_url":"https://api.github.com/users/DoanhPHAM/gists{/gist_id}","starred_url":"https://api.github.com/users/DoanhPHAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoanhPHAM/subscriptions","organizations_url":"https://api.github.com/users/DoanhPHAM/orgs","repos_url":"https://api.github.com/users/DoanhPHAM/repos","events_url":"https://api.github.com/users/DoanhPHAM/events{/privacy}","received_events_url":"https://api.github.com/users/DoanhPHAM/received_events","type":"User","site_admin":false},"body":"thừa dòng trống này","created_at":"2016-08-22T06:01:54Z","updated_at":"2016-08-22T06:01:54Z","html_url":"https://github.com/framgia/fels_170/pull/13#discussion_r75621817","pull_request_url":"https://api.github.com/repos/framgia/fels_170/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_170/pulls/comments/75621817"},"html":{"href":"https://github.com/framgia/fels_170/pull/13#discussion_r75621817"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_170/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_170/pulls/13","id":81067637,"html_url":"https://github.com/framgia/fels_170/pull/13","diff_url":"https://github.com/framgia/fels_170/pull/13.diff","patch_url":"https://github.com/framgia/fels_170/pull/13.patch","issue_url":"https://api.github.com/repos/framgia/fels_170/issues/13","number":13,"state":"open","locked":false,"title":"add-avatar","user":{"login":"trang94","id":9588160,"avatar_url":"https://avatars.githubusercontent.com/u/9588160?v=3","gravatar_id":"","url":"https://api.github.com/users/trang94","html_url":"https://github.com/trang94","followers_url":"https://api.github.com/users/trang94/followers","following_url":"https://api.github.com/users/trang94/following{/other_user}","gists_url":"https://api.github.com/users/trang94/gists{/gist_id}","starred_url":"https://api.github.com/users/trang94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trang94/subscriptions","organizations_url":"https://api.github.com/users/trang94/orgs","repos_url":"https://api.github.com/users/trang94/repos","events_url":"https://api.github.com/users/trang94/events{/privacy}","received_events_url":"https://api.github.com/users/trang94/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-12T04:53:02Z","updated_at":"2016-08-22T06:01:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"010bd540e0b6117e3e93ec5e9c208052319e4922","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_170/pulls/13/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_170/pulls/13/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_170/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_170/issues/13/comments","statuses_url":"https://api.github.com/repos/framgia/fels_170/statuses/7d6741620b1f7e39a10809c43d56a1e56f344235","head":{"label":"trang94:add-avatar","ref":"add-avatar","sha":"7d6741620b1f7e39a10809c43d56a1e56f344235","user":{"login":"trang94","id":9588160,"avatar_url":"https://avatars.githubusercontent.com/u/9588160?v=3","gravatar_id":"","url":"https://api.github.com/users/trang94","html_url":"https://github.com/trang94","followers_url":"https://api.github.com/users/trang94/followers","following_url":"https://api.github.com/users/trang94/following{/other_user}","gists_url":"https://api.github.com/users/trang94/gists{/gist_id}","starred_url":"https://api.github.com/users/trang94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trang94/subscriptions","organizations_url":"https://api.github.com/users/trang94/orgs","repos_url":"https://api.github.com/users/trang94/repos","events_url":"https://api.github.com/users/trang94/events{/privacy}","received_events_url":"https://api.github.com/users/trang94/received_events","type":"User","site_admin":false},"repo":{"id":64989907,"name":"fels_170","full_name":"trang94/fels_170","owner":{"login":"trang94","id":9588160,"avatar_url":"https://avatars.githubusercontent.com/u/9588160?v=3","gravatar_id":"","url":"https://api.github.com/users/trang94","html_url":"https://github.com/trang94","followers_url":"https://api.github.com/users/trang94/followers","following_url":"https://api.github.com/users/trang94/following{/other_user}","gists_url":"https://api.github.com/users/trang94/gists{/gist_id}","starred_url":"https://api.github.com/users/trang94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trang94/subscriptions","organizations_url":"https://api.github.com/users/trang94/orgs","repos_url":"https://api.github.com/users/trang94/repos","events_url":"https://api.github.com/users/trang94/events{/privacy}","received_events_url":"https://api.github.com/users/trang94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trang94/fels_170","description":"Framgia E Learning System (Training)","fork":true,"url":"https://api.github.com/repos/trang94/fels_170","forks_url":"https://api.github.com/repos/trang94/fels_170/forks","keys_url":"https://api.github.com/repos/trang94/fels_170/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trang94/fels_170/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trang94/fels_170/teams","hooks_url":"https://api.github.com/repos/trang94/fels_170/hooks","issue_events_url":"https://api.github.com/repos/trang94/fels_170/issues/events{/number}","events_url":"https://api.github.com/repos/trang94/fels_170/events","assignees_url":"https://api.github.com/repos/trang94/fels_170/assignees{/user}","branches_url":"https://api.github.com/repos/trang94/fels_170/branches{/branch}","tags_url":"https://api.github.com/repos/trang94/fels_170/tags","blobs_url":"https://api.github.com/repos/trang94/fels_170/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trang94/fels_170/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trang94/fels_170/git/refs{/sha}","trees_url":"https://api.github.com/repos/trang94/fels_170/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trang94/fels_170/statuses/{sha}","languages_url":"https://api.github.com/repos/trang94/fels_170/languages","stargazers_url":"https://api.github.com/repos/trang94/fels_170/stargazers","contributors_url":"https://api.github.com/repos/trang94/fels_170/contributors","subscribers_url":"https://api.github.com/repos/trang94/fels_170/subscribers","subscription_url":"https://api.github.com/repos/trang94/fels_170/subscription","commits_url":"https://api.github.com/repos/trang94/fels_170/commits{/sha}","git_commits_url":"https://api.github.com/repos/trang94/fels_170/git/commits{/sha}","comments_url":"https://api.github.com/repos/trang94/fels_170/comments{/number}","issue_comment_url":"https://api.github.com/repos/trang94/fels_170/issues/comments{/number}","contents_url":"https://api.github.com/repos/trang94/fels_170/contents/{+path}","compare_url":"https://api.github.com/repos/trang94/fels_170/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trang94/fels_170/merges","archive_url":"https://api.github.com/repos/trang94/fels_170/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trang94/fels_170/downloads","issues_url":"https://api.github.com/repos/trang94/fels_170/issues{/number}","pulls_url":"https://api.github.com/repos/trang94/fels_170/pulls{/number}","milestones_url":"https://api.github.com/repos/trang94/fels_170/milestones{/number}","notifications_url":"https://api.github.com/repos/trang94/fels_170/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trang94/fels_170/labels{/name}","releases_url":"https://api.github.com/repos/trang94/fels_170/releases{/id}","deployments_url":"https://api.github.com/repos/trang94/fels_170/deployments","created_at":"2016-08-05T05:01:34Z","updated_at":"2016-07-28T06:22:51Z","pushed_at":"2016-08-22T04:31:58Z","git_url":"git://github.com/trang94/fels_170.git","ssh_url":"git@github.com:trang94/fels_170.git","clone_url":"https://github.com/trang94/fels_170.git","svn_url":"https://github.com/trang94/fels_170","homepage":null,"size":85,"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":"50407d050ff85546f8f3ea8d07235134c9c53bc1","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":64369335,"name":"fels_170","full_name":"framgia/fels_170","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_170","description":"Framgia E Learning System (Training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_170","forks_url":"https://api.github.com/repos/framgia/fels_170/forks","keys_url":"https://api.github.com/repos/framgia/fels_170/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_170/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_170/teams","hooks_url":"https://api.github.com/repos/framgia/fels_170/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_170/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_170/events","assignees_url":"https://api.github.com/repos/framgia/fels_170/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_170/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_170/tags","blobs_url":"https://api.github.com/repos/framgia/fels_170/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_170/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_170/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_170/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_170/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_170/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_170/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_170/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_170/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_170/subscription","commits_url":"https://api.github.com/repos/framgia/fels_170/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_170/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_170/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_170/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_170/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_170/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_170/merges","archive_url":"https://api.github.com/repos/framgia/fels_170/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_170/downloads","issues_url":"https://api.github.com/repos/framgia/fels_170/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_170/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_170/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_170/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_170/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_170/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fels_170/deployments","created_at":"2016-07-28T06:22:51Z","updated_at":"2016-07-28T06:22:51Z","pushed_at":"2016-08-22T06:01:06Z","git_url":"git://github.com/framgia/fels_170.git","ssh_url":"git@github.com:framgia/fels_170.git","clone_url":"https://github.com/framgia/fels_170.git","svn_url":"https://github.com/framgia/fels_170","homepage":null,"size":98,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_170/pulls/13"},"html":{"href":"https://github.com/framgia/fels_170/pull/13"},"issue":{"href":"https://api.github.com/repos/framgia/fels_170/issues/13"},"comments":{"href":"https://api.github.com/repos/framgia/fels_170/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_170/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_170/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_170/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_170/statuses/7d6741620b1f7e39a10809c43d56a1e56f344235"}}}}
{"actor":{"display_login":"DoanhPHAM"}}