{"action":"created","comment":{"url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/comments/212536231","pull_request_review_id":149192160,"id":212536231,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjUzNjIzMQ==","diff_hunk":"@@ -19,7 +20,14 @@ class ProductController extends ApiController\n      */\n     public function index(Request $request)\n     {\n-        $newestProductsSlide = Product::with('store', 'images')->filter($request)->get();\n-        return $this->showAll($newestProductsSlide, Response::HTTP_OK);\n+        if ($request->filter) {\n+            $products = Category::where('parent_id', 0)->get();","path":"app/Http/Controllers/Api/User/ProductController.php","position":15,"original_position":15,"commit_id":"91e615f84ec3920dab2b41af01ec96b4a77ca418","original_commit_id":"91e615f84ec3920dab2b41af01ec96b4a77ca418","user":{"login":"at-quangtran","id":15379864,"node_id":"MDQ6VXNlcjE1Mzc5ODY0","avatar_url":"https://avatars2.githubusercontent.com/u/15379864?v=4","gravatar_id":"","url":"https://api.github.com/users/at-quangtran","html_url":"https://github.com/at-quangtran","followers_url":"https://api.github.com/users/at-quangtran/followers","following_url":"https://api.github.com/users/at-quangtran/following{/other_user}","gists_url":"https://api.github.com/users/at-quangtran/gists{/gist_id}","starred_url":"https://api.github.com/users/at-quangtran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-quangtran/subscriptions","organizations_url":"https://api.github.com/users/at-quangtran/orgs","repos_url":"https://api.github.com/users/at-quangtran/repos","events_url":"https://api.github.com/users/at-quangtran/events{/privacy}","received_events_url":"https://api.github.com/users/at-quangtran/received_events","type":"User","site_admin":false},"body":"$categories","created_at":"2018-08-24T06:54:52Z","updated_at":"2018-08-24T06:54:53Z","html_url":"https://github.com/AT-PHPIntership/foody/pull/36#discussion_r212536231","pull_request_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/36","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/comments/212536231"},"html":{"href":"https://github.com/AT-PHPIntership/foody/pull/36#discussion_r212536231"},"pull_request":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/36","id":209733040,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NzMzMDQw","html_url":"https://github.com/AT-PHPIntership/foody/pull/36","diff_url":"https://github.com/AT-PHPIntership/foody/pull/36.diff","patch_url":"https://github.com/AT-PHPIntership/foody/pull/36.patch","issue_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/36","number":36,"state":"open","locked":false,"title":"Show products in category home page","user":{"login":"at-vyle","id":40163579,"node_id":"MDQ6VXNlcjQwMTYzNTc5","avatar_url":"https://avatars2.githubusercontent.com/u/40163579?v=4","gravatar_id":"","url":"https://api.github.com/users/at-vyle","html_url":"https://github.com/at-vyle","followers_url":"https://api.github.com/users/at-vyle/followers","following_url":"https://api.github.com/users/at-vyle/following{/other_user}","gists_url":"https://api.github.com/users/at-vyle/gists{/gist_id}","starred_url":"https://api.github.com/users/at-vyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-vyle/subscriptions","organizations_url":"https://api.github.com/users/at-vyle/orgs","repos_url":"https://api.github.com/users/at-vyle/repos","events_url":"https://api.github.com/users/at-vyle/events{/privacy}","received_events_url":"https://api.github.com/users/at-vyle/received_events","type":"User","site_admin":false},"body":"## Description\r\n- Show hotest products in category home page\r\n## Reference Requirements\r\n\r\n## Reference Isuees\r\n\r\n\r\n## Migrations\r\nNO\r\n\r\n## Impacted Areas in Application\r\nList general components of the application that this PR will affect:\r\n\r\n-\r\n\r\n## SQL query and `explain`\r\nList of all queries and attach the result of each explaining query (in text, screenshot...)\r\n\r\n- Refer to [Using Explain with MySQL](https://viblo.asia/p/su-dung-explain-de-toi-uu-cau-lenh-mysql-BYjv44gmvxpV)\r\n","created_at":"2018-08-21T07:33:24Z","updated_at":"2018-08-24T06:54:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"244ffd5506228af30db962872bbe32079ac05ab8","assignee":{"login":"at-quangtran","id":15379864,"node_id":"MDQ6VXNlcjE1Mzc5ODY0","avatar_url":"https://avatars2.githubusercontent.com/u/15379864?v=4","gravatar_id":"","url":"https://api.github.com/users/at-quangtran","html_url":"https://github.com/at-quangtran","followers_url":"https://api.github.com/users/at-quangtran/followers","following_url":"https://api.github.com/users/at-quangtran/following{/other_user}","gists_url":"https://api.github.com/users/at-quangtran/gists{/gist_id}","starred_url":"https://api.github.com/users/at-quangtran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-quangtran/subscriptions","organizations_url":"https://api.github.com/users/at-quangtran/orgs","repos_url":"https://api.github.com/users/at-quangtran/repos","events_url":"https://api.github.com/users/at-quangtran/events{/privacy}","received_events_url":"https://api.github.com/users/at-quangtran/received_events","type":"User","site_admin":false},"assignees":[{"login":"at-quangtran","id":15379864,"node_id":"MDQ6VXNlcjE1Mzc5ODY0","avatar_url":"https://avatars2.githubusercontent.com/u/15379864?v=4","gravatar_id":"","url":"https://api.github.com/users/at-quangtran","html_url":"https://github.com/at-quangtran","followers_url":"https://api.github.com/users/at-quangtran/followers","following_url":"https://api.github.com/users/at-quangtran/following{/other_user}","gists_url":"https://api.github.com/users/at-quangtran/gists{/gist_id}","starred_url":"https://api.github.com/users/at-quangtran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-quangtran/subscriptions","organizations_url":"https://api.github.com/users/at-quangtran/orgs","repos_url":"https://api.github.com/users/at-quangtran/repos","events_url":"https://api.github.com/users/at-quangtran/events{/privacy}","received_events_url":"https://api.github.com/users/at-quangtran/received_events","type":"User","site_admin":false},{"login":"at-hienpham","id":40163625,"node_id":"MDQ6VXNlcjQwMTYzNjI1","avatar_url":"https://avatars1.githubusercontent.com/u/40163625?v=4","gravatar_id":"","url":"https://api.github.com/users/at-hienpham","html_url":"https://github.com/at-hienpham","followers_url":"https://api.github.com/users/at-hienpham/followers","following_url":"https://api.github.com/users/at-hienpham/following{/other_user}","gists_url":"https://api.github.com/users/at-hienpham/gists{/gist_id}","starred_url":"https://api.github.com/users/at-hienpham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-hienpham/subscriptions","organizations_url":"https://api.github.com/users/at-hienpham/orgs","repos_url":"https://api.github.com/users/at-hienpham/repos","events_url":"https://api.github.com/users/at-hienpham/events{/privacy}","received_events_url":"https://api.github.com/users/at-hienpham/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"at-hienpham","id":40163625,"node_id":"MDQ6VXNlcjQwMTYzNjI1","avatar_url":"https://avatars1.githubusercontent.com/u/40163625?v=4","gravatar_id":"","url":"https://api.github.com/users/at-hienpham","html_url":"https://github.com/at-hienpham","followers_url":"https://api.github.com/users/at-hienpham/followers","following_url":"https://api.github.com/users/at-hienpham/following{/other_user}","gists_url":"https://api.github.com/users/at-hienpham/gists{/gist_id}","starred_url":"https://api.github.com/users/at-hienpham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-hienpham/subscriptions","organizations_url":"https://api.github.com/users/at-hienpham/orgs","repos_url":"https://api.github.com/users/at-hienpham/repos","events_url":"https://api.github.com/users/at-hienpham/events{/privacy}","received_events_url":"https://api.github.com/users/at-hienpham/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":998205835,"node_id":"MDU6TGFiZWw5OTgyMDU4MzU=","url":"https://api.github.com/repos/AT-PHPIntership/foody/labels/User","name":"User","color":"a2eeef","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/36/commits","review_comments_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/36/comments","review_comment_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/36/comments","statuses_url":"https://api.github.com/repos/AT-PHPIntership/foody/statuses/91e615f84ec3920dab2b41af01ec96b4a77ca418","head":{"label":"AT-PHPIntership:show-hot-products-in-category","ref":"show-hot-products-in-category","sha":"91e615f84ec3920dab2b41af01ec96b4a77ca418","user":{"login":"AT-PHPIntership","id":17865237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3ODY1MjM3","avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"repo":{"id":141513371,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MTMzNzE=","name":"foody","full_name":"AT-PHPIntership/foody","owner":{"login":"AT-PHPIntership","id":17865237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3ODY1MjM3","avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AT-PHPIntership/foody","description":"Foody","fork":false,"url":"https://api.github.com/repos/AT-PHPIntership/foody","forks_url":"https://api.github.com/repos/AT-PHPIntership/foody/forks","keys_url":"https://api.github.com/repos/AT-PHPIntership/foody/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AT-PHPIntership/foody/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AT-PHPIntership/foody/teams","hooks_url":"https://api.github.com/repos/AT-PHPIntership/foody/hooks","issue_events_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/events{/number}","events_url":"https://api.github.com/repos/AT-PHPIntership/foody/events","assignees_url":"https://api.github.com/repos/AT-PHPIntership/foody/assignees{/user}","branches_url":"https://api.github.com/repos/AT-PHPIntership/foody/branches{/branch}","tags_url":"https://api.github.com/repos/AT-PHPIntership/foody/tags","blobs_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/refs{/sha}","trees_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AT-PHPIntership/foody/statuses/{sha}","languages_url":"https://api.github.com/repos/AT-PHPIntership/foody/languages","stargazers_url":"https://api.github.com/repos/AT-PHPIntership/foody/stargazers","contributors_url":"https://api.github.com/repos/AT-PHPIntership/foody/contributors","subscribers_url":"https://api.github.com/repos/AT-PHPIntership/foody/subscribers","subscription_url":"https://api.github.com/repos/AT-PHPIntership/foody/subscription","commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/commits{/sha}","git_commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/commits{/sha}","comments_url":"https://api.github.com/repos/AT-PHPIntership/foody/comments{/number}","issue_comment_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/comments{/number}","contents_url":"https://api.github.com/repos/AT-PHPIntership/foody/contents/{+path}","compare_url":"https://api.github.com/repos/AT-PHPIntership/foody/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AT-PHPIntership/foody/merges","archive_url":"https://api.github.com/repos/AT-PHPIntership/foody/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AT-PHPIntership/foody/downloads","issues_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues{/number}","pulls_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls{/number}","milestones_url":"https://api.github.com/repos/AT-PHPIntership/foody/milestones{/number}","notifications_url":"https://api.github.com/repos/AT-PHPIntership/foody/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AT-PHPIntership/foody/labels{/name}","releases_url":"https://api.github.com/repos/AT-PHPIntership/foody/releases{/id}","deployments_url":"https://api.github.com/repos/AT-PHPIntership/foody/deployments","created_at":"2018-07-19T02:19:45Z","updated_at":"2018-08-23T10:10:44Z","pushed_at":"2018-08-24T06:50:19Z","git_url":"git://github.com/AT-PHPIntership/foody.git","ssh_url":"git@github.com:AT-PHPIntership/foody.git","clone_url":"https://github.com/AT-PHPIntership/foody.git","svn_url":"https://github.com/AT-PHPIntership/foody","homepage":null,"size":22956,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"AT-PHPIntership:master","ref":"master","sha":"a5a432f2f5eb5a10571132799f1f228c868dd61a","user":{"login":"AT-PHPIntership","id":17865237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3ODY1MjM3","avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"repo":{"id":141513371,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MTMzNzE=","name":"foody","full_name":"AT-PHPIntership/foody","owner":{"login":"AT-PHPIntership","id":17865237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3ODY1MjM3","avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AT-PHPIntership/foody","description":"Foody","fork":false,"url":"https://api.github.com/repos/AT-PHPIntership/foody","forks_url":"https://api.github.com/repos/AT-PHPIntership/foody/forks","keys_url":"https://api.github.com/repos/AT-PHPIntership/foody/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AT-PHPIntership/foody/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AT-PHPIntership/foody/teams","hooks_url":"https://api.github.com/repos/AT-PHPIntership/foody/hooks","issue_events_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/events{/number}","events_url":"https://api.github.com/repos/AT-PHPIntership/foody/events","assignees_url":"https://api.github.com/repos/AT-PHPIntership/foody/assignees{/user}","branches_url":"https://api.github.com/repos/AT-PHPIntership/foody/branches{/branch}","tags_url":"https://api.github.com/repos/AT-PHPIntership/foody/tags","blobs_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/refs{/sha}","trees_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AT-PHPIntership/foody/statuses/{sha}","languages_url":"https://api.github.com/repos/AT-PHPIntership/foody/languages","stargazers_url":"https://api.github.com/repos/AT-PHPIntership/foody/stargazers","contributors_url":"https://api.github.com/repos/AT-PHPIntership/foody/contributors","subscribers_url":"https://api.github.com/repos/AT-PHPIntership/foody/subscribers","subscription_url":"https://api.github.com/repos/AT-PHPIntership/foody/subscription","commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/commits{/sha}","git_commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/commits{/sha}","comments_url":"https://api.github.com/repos/AT-PHPIntership/foody/comments{/number}","issue_comment_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/comments{/number}","contents_url":"https://api.github.com/repos/AT-PHPIntership/foody/contents/{+path}","compare_url":"https://api.github.com/repos/AT-PHPIntership/foody/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AT-PHPIntership/foody/merges","archive_url":"https://api.github.com/repos/AT-PHPIntership/foody/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AT-PHPIntership/foody/downloads","issues_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues{/number}","pulls_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls{/number}","milestones_url":"https://api.github.com/repos/AT-PHPIntership/foody/milestones{/number}","notifications_url":"https://api.github.com/repos/AT-PHPIntership/foody/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AT-PHPIntership/foody/labels{/name}","releases_url":"https://api.github.com/repos/AT-PHPIntership/foody/releases{/id}","deployments_url":"https://api.github.com/repos/AT-PHPIntership/foody/deployments","created_at":"2018-07-19T02:19:45Z","updated_at":"2018-08-23T10:10:44Z","pushed_at":"2018-08-24T06:50:19Z","git_url":"git://github.com/AT-PHPIntership/foody.git","ssh_url":"git@github.com:AT-PHPIntership/foody.git","clone_url":"https://github.com/AT-PHPIntership/foody.git","svn_url":"https://github.com/AT-PHPIntership/foody","homepage":null,"size":22956,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/36"},"html":{"href":"https://github.com/AT-PHPIntership/foody/pull/36"},"issue":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/issues/36"},"comments":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/statuses/91e615f84ec3920dab2b41af01ec96b4a77ca418"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"at-quangtran"}}