{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/framgia_book_store/pulls/comments/153978245","pull_request_review_id":80068875,"id":153978245,"diff_hunk":"@@ -0,0 +1,141 @@\n+<?php\n+\n+namespace App\\Http\\Controllers;\n+\n+use Illuminate\\Http\\Request;\n+use App\\Models\\Slide;\n+use Storage;\n+\n+class SlideController extends Controller\n+{\n+    /**\n+     * Display a listing of the resource.\n+     *\n+     * @return \\Illuminate\\Http\\Response\n+     */\n+    public function index()\n+    {\n+        $data['listSlide'] = Slide::paginate(config('customer.page'));\n+\n+        return view('admin.listslide', $data);\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+        return view('admin.add-edit-slide');\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+            'name' => 'required|string|max:255',\n+            'link' => 'required|string',\n+            'image_path' => 'required',\n+            'description' => 'required',\n+        ]);\n+        $image_path = '';\n+        if ($request->hasFile('image_path')){\n+            $image_path = $request->file('image_path')->getClientOriginalName();\n+            $image_path = time() . $image_path;\n+            $request->file('image_path')->move(config('customer.image_path.slides'), $image_path);\n+        }\n+        Slide::create([\n+            'name' => $request['name'],\n+            'link' => $request['link'],\n+            'description' => $request['description'],\n+            'image_path' => $image_path,\n+            'status' => $request['status'],\n+        ]);\n+\n+        return redirect()->route('admin.slide.index');\n+    }\n+\n+    /**\n+     * Display the specified resource.\n+     *\n+     * @param  int  $id\n+     * @return \\Illuminate\\Http\\Response\n+     */\n+    public function show($id)\n+    {\n+        //\n+    }\n+\n+    /**\n+     * Show the form for editing the specified resource.\n+     *\n+     * @param  int  $id\n+     * @return \\Illuminate\\Http\\Response\n+     */\n+    public function edit($id)\n+    {\n+        $data['slide'] = Slide::find($id);\n+\n+        return view('admin.add-edit-slide', $data);\n+    }\n+\n+    /**\n+     * Update the specified resource in storage.\n+     *\n+     * @param  \\Illuminate\\Http\\Request  $request\n+     * @param  int  $id\n+     * @return \\Illuminate\\Http\\Response\n+     */\n+    public function update(Request $request, $id)\n+    {\n+        $this->validate($request, [\n+            'name' => 'required|string|max:255',\n+            'link' => 'required|string',\n+            'description' => 'required',\n+        ]);\n+        $slide = Slide::where('id', $id);\n+        if ($request->hasFile('image_path')){","path":"app/Http/Controllers/SlideController.php","position":103,"original_position":103,"commit_id":"6e4c18288f04f1e368d9a18754bf4ac390378160","original_commit_id":"ab69f808dc388991a24f2c4e9c63160200880b01","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":"Convetion `){`","created_at":"2017-11-30T03:30:02Z","updated_at":"2017-11-30T03:43:04Z","html_url":"https://github.com/framgia/framgia_book_store/pull/15#discussion_r153978245","pull_request_url":"https://api.github.com/repos/framgia/framgia_book_store/pulls/15","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/framgia/framgia_book_store/pulls/comments/153978245"},"html":{"href":"https://github.com/framgia/framgia_book_store/pull/15#discussion_r153978245"},"pull_request":{"href":"https://api.github.com/repos/framgia/framgia_book_store/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/framgia_book_store/pulls/15","id":155335919,"html_url":"https://github.com/framgia/framgia_book_store/pull/15","diff_url":"https://github.com/framgia/framgia_book_store/pull/15.diff","patch_url":"https://github.com/framgia/framgia_book_store/pull/15.patch","issue_url":"https://api.github.com/repos/framgia/framgia_book_store/issues/15","number":15,"state":"open","locked":false,"title":"'slide'","user":{"login":"lethibaongan","id":30307586,"avatar_url":"https://avatars0.githubusercontent.com/u/30307586?v=4","gravatar_id":"","url":"https://api.github.com/users/lethibaongan","html_url":"https://github.com/lethibaongan","followers_url":"https://api.github.com/users/lethibaongan/followers","following_url":"https://api.github.com/users/lethibaongan/following{/other_user}","gists_url":"https://api.github.com/users/lethibaongan/gists{/gist_id}","starred_url":"https://api.github.com/users/lethibaongan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lethibaongan/subscriptions","organizations_url":"https://api.github.com/users/lethibaongan/orgs","repos_url":"https://api.github.com/users/lethibaongan/repos","events_url":"https://api.github.com/users/lethibaongan/events{/privacy}","received_events_url":"https://api.github.com/users/lethibaongan/received_events","type":"User","site_admin":false},"body":"Xem list slide\r\nThêm sửa xóa một slide","created_at":"2017-11-29T13:12:02Z","updated_at":"2017-11-30T03:43:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4bc07d30fda643dd6aa6aa3c06e3e31a4a42e1c0","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/framgia_book_store/pulls/15/commits","review_comments_url":"https://api.github.com/repos/framgia/framgia_book_store/pulls/15/comments","review_comment_url":"https://api.github.com/repos/framgia/framgia_book_store/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/framgia_book_store/issues/15/comments","statuses_url":"https://api.github.com/repos/framgia/framgia_book_store/statuses/6e4c18288f04f1e368d9a18754bf4ac390378160","head":{"label":"lethibaongan:listslide","ref":"listslide","sha":"6e4c18288f04f1e368d9a18754bf4ac390378160","user":{"login":"lethibaongan","id":30307586,"avatar_url":"https://avatars0.githubusercontent.com/u/30307586?v=4","gravatar_id":"","url":"https://api.github.com/users/lethibaongan","html_url":"https://github.com/lethibaongan","followers_url":"https://api.github.com/users/lethibaongan/followers","following_url":"https://api.github.com/users/lethibaongan/following{/other_user}","gists_url":"https://api.github.com/users/lethibaongan/gists{/gist_id}","starred_url":"https://api.github.com/users/lethibaongan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lethibaongan/subscriptions","organizations_url":"https://api.github.com/users/lethibaongan/orgs","repos_url":"https://api.github.com/users/lethibaongan/repos","events_url":"https://api.github.com/users/lethibaongan/events{/privacy}","received_events_url":"https://api.github.com/users/lethibaongan/received_events","type":"User","site_admin":false},"repo":{"id":109798147,"name":"framgia_book_store","full_name":"lethibaongan/framgia_book_store","owner":{"login":"lethibaongan","id":30307586,"avatar_url":"https://avatars0.githubusercontent.com/u/30307586?v=4","gravatar_id":"","url":"https://api.github.com/users/lethibaongan","html_url":"https://github.com/lethibaongan","followers_url":"https://api.github.com/users/lethibaongan/followers","following_url":"https://api.github.com/users/lethibaongan/following{/other_user}","gists_url":"https://api.github.com/users/lethibaongan/gists{/gist_id}","starred_url":"https://api.github.com/users/lethibaongan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lethibaongan/subscriptions","organizations_url":"https://api.github.com/users/lethibaongan/orgs","repos_url":"https://api.github.com/users/lethibaongan/repos","events_url":"https://api.github.com/users/lethibaongan/events{/privacy}","received_events_url":"https://api.github.com/users/lethibaongan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lethibaongan/framgia_book_store","description":"framgia_book_store (Training)","fork":true,"url":"https://api.github.com/repos/lethibaongan/framgia_book_store","forks_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/forks","keys_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/teams","hooks_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/hooks","issue_events_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/issues/events{/number}","events_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/events","assignees_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/assignees{/user}","branches_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/branches{/branch}","tags_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/tags","blobs_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/git/refs{/sha}","trees_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/statuses/{sha}","languages_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/languages","stargazers_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/stargazers","contributors_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/contributors","subscribers_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/subscribers","subscription_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/subscription","commits_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/commits{/sha}","git_commits_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/git/commits{/sha}","comments_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/comments{/number}","issue_comment_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/issues/comments{/number}","contents_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/contents/{+path}","compare_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/merges","archive_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/downloads","issues_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/issues{/number}","pulls_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/pulls{/number}","milestones_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/milestones{/number}","notifications_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/labels{/name}","releases_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/releases{/id}","deployments_url":"https://api.github.com/repos/lethibaongan/framgia_book_store/deployments","created_at":"2017-11-07T06:55:07Z","updated_at":"2017-11-01T08:55:46Z","pushed_at":"2017-11-30T03:38:34Z","git_url":"git://github.com/lethibaongan/framgia_book_store.git","ssh_url":"git@github.com:lethibaongan/framgia_book_store.git","clone_url":"https://github.com/lethibaongan/framgia_book_store.git","svn_url":"https://github.com/lethibaongan/framgia_book_store","homepage":null,"size":1456,"stargazers_count":0,"watchers_count":0,"language":null,"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":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"e004a1b056ae0edc8d55e5051522b5d8176922f2","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":109108941,"name":"framgia_book_store","full_name":"framgia/framgia_book_store","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/framgia_book_store","description":"framgia_book_store (Training)","fork":false,"url":"https://api.github.com/repos/framgia/framgia_book_store","forks_url":"https://api.github.com/repos/framgia/framgia_book_store/forks","keys_url":"https://api.github.com/repos/framgia/framgia_book_store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/framgia_book_store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/framgia_book_store/teams","hooks_url":"https://api.github.com/repos/framgia/framgia_book_store/hooks","issue_events_url":"https://api.github.com/repos/framgia/framgia_book_store/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/framgia_book_store/events","assignees_url":"https://api.github.com/repos/framgia/framgia_book_store/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/framgia_book_store/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/framgia_book_store/tags","blobs_url":"https://api.github.com/repos/framgia/framgia_book_store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/framgia_book_store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/framgia_book_store/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/framgia_book_store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/framgia_book_store/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/framgia_book_store/languages","stargazers_url":"https://api.github.com/repos/framgia/framgia_book_store/stargazers","contributors_url":"https://api.github.com/repos/framgia/framgia_book_store/contributors","subscribers_url":"https://api.github.com/repos/framgia/framgia_book_store/subscribers","subscription_url":"https://api.github.com/repos/framgia/framgia_book_store/subscription","commits_url":"https://api.github.com/repos/framgia/framgia_book_store/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/framgia_book_store/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/framgia_book_store/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/framgia_book_store/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/framgia_book_store/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/framgia_book_store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/framgia_book_store/merges","archive_url":"https://api.github.com/repos/framgia/framgia_book_store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/framgia_book_store/downloads","issues_url":"https://api.github.com/repos/framgia/framgia_book_store/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/framgia_book_store/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/framgia_book_store/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/framgia_book_store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/framgia_book_store/labels{/name}","releases_url":"https://api.github.com/repos/framgia/framgia_book_store/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/framgia_book_store/deployments","created_at":"2017-11-01T08:55:46Z","updated_at":"2017-11-01T08:55:46Z","pushed_at":"2017-11-30T03:38:35Z","git_url":"git://github.com/framgia/framgia_book_store.git","ssh_url":"git@github.com:framgia/framgia_book_store.git","clone_url":"https://github.com/framgia/framgia_book_store.git","svn_url":"https://github.com/framgia/framgia_book_store","homepage":null,"size":1440,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/framgia_book_store/pulls/15"},"html":{"href":"https://github.com/framgia/framgia_book_store/pull/15"},"issue":{"href":"https://api.github.com/repos/framgia/framgia_book_store/issues/15"},"comments":{"href":"https://api.github.com/repos/framgia/framgia_book_store/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/framgia_book_store/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/framgia_book_store/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/framgia_book_store/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/framgia_book_store/statuses/6e4c18288f04f1e368d9a18754bf4ac390378160"}},"author_association":"NONE"}}
{"actor":{"display_login":"trangkarol"}}