{"action":"created","comment":{"url":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/comments/87725405","pull_request_review_id":8325496,"id":87725405,"diff_hunk":"@@ -93,36 +93,52 @@\n         <label for=\"general_skills\">Skills</label>\n         <ul name=\"general_skills[]\" id=\"general_skills\" >\n \n-        @foreach($general_skills as $option)\n-           <li>\n-            {{$option->name}}\n-            <input type=\"number\" name=\"general_skills[{{ $option->id }}]\" value=\"{{ (collect(old('general_skills'))->count() > 0) ? intval(collect(old('general_skills'))->toArray()[$option->id]):0}}\" placeholder=\"0\" min=\"0\" step=\"1\">\n-        </li>\n-        @endforeach\n-\n-    </ul>\n-</div>\n-\n-<div class=\"form-group{{ $errors->has('languages') ? ' has-danger' : '' }}\">\n-    <label for=\"languages\">Languages</label>\n-    <select name=\"languages[]\" id=\"languages\" class=\"selectpicker {{ $errors->has('name') ? ' form-control-danger' : '' }}\" multiple>\n-        @foreach($languages as $option)\n-        <option value=\"{{ $option->id }}\" {{ (collect(old('languages'))->contains($option->id)) ? 'selected':'' }}>{{ $option->name }}</option>\n-        @endforeach\n-\n-    </select>\n-    @if ($errors->has('languages'))\n-    <br>\n-    <span class=\"help-block form-control-feedback\">\n-        <strong>{{ $errors->first('languages') }}</strong>\n-    </span>\n-    @endif\n-</div>\n+            <?php\n+            $skills_array = collect(array_pluck($general_skills->toArray(), 'pivot.count', 'id'));\n+            ?>\n+\n+            @foreach(App\\GeneralSkill::all() as $option)\n+            @if (count(collect(old('general_skills'))) > 0)\n+            <li>\n+                {{$option->name}}\n+                <input type=\"number\" name=\"general_skills[{{ $option->id }}]\" value=\"{{ (collect(old('general_skills'))->count() > 0) ? intval(collect(old('general_skills'))->toArray()[$option->id]):0}}\" placeholder=\"0\" min=\"0\" step=\"1\">\n+            </li>\n+            @else\n+            <li>\n+\n+                {{$option->name}}\n+                <input type=\"number\" name=\"general_skills[{{ $option->id }}]\" value=\"{{ ($skills_array->keys()->contains($option->id)) ? intval($skills_array[$option->id]):0}}\" placeholder=\"0\" min=\"0\" step=\"1\">\n+            </li>\n+            @endif\n+            @endforeach\n+\n+        </ul>\n+    </div>\n+    <div class=\"form-group{{ $errors->has('languages') ? ' has-danger' : '' }}\">\n+        <label for=\"languages\">Languages</label>\n+        <select name=\"languages[]\" id=\"languages\" class=\"selectpicker {{ $errors->has('name') ? ' form-control-danger' : '' }}\" multiple>\n+\n+            @foreach(App\\Language::all() as $option)","path":"resources/views/projects/template.blade.php","position":54,"original_position":54,"commit_id":"8464d4c87d616cbe0d5bd11999b5863e14021133","original_commit_id":"8464d4c87d616cbe0d5bd11999b5863e14021133","user":{"login":"ice-blaze","id":3356843,"avatar_url":"https://avatars.githubusercontent.com/u/3356843?v=3","gravatar_id":"","url":"https://api.github.com/users/ice-blaze","html_url":"https://github.com/ice-blaze","followers_url":"https://api.github.com/users/ice-blaze/followers","following_url":"https://api.github.com/users/ice-blaze/following{/other_user}","gists_url":"https://api.github.com/users/ice-blaze/gists{/gist_id}","starred_url":"https://api.github.com/users/ice-blaze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice-blaze/subscriptions","organizations_url":"https://api.github.com/users/ice-blaze/orgs","repos_url":"https://api.github.com/users/ice-blaze/repos","events_url":"https://api.github.com/users/ice-blaze/events{/privacy}","received_events_url":"https://api.github.com/users/ice-blaze/received_events","type":"User","site_admin":false},"body":"```\r\n@foreach\r\n    @if\r\n    @endif\r\n@endforeach\r\n```","created_at":"2016-11-13T23:37:41Z","updated_at":"2016-11-13T23:38:45Z","html_url":"https://github.com/ice-blaze/talent-linker/pull/110#discussion_r87725405","pull_request_url":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/comments/87725405"},"html":{"href":"https://github.com/ice-blaze/talent-linker/pull/110#discussion_r87725405"},"pull_request":{"href":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/110","id":93491835,"html_url":"https://github.com/ice-blaze/talent-linker/pull/110","diff_url":"https://github.com/ice-blaze/talent-linker/pull/110.diff","patch_url":"https://github.com/ice-blaze/talent-linker/pull/110.patch","issue_url":"https://api.github.com/repos/ice-blaze/talent-linker/issues/110","number":110,"state":"open","locked":false,"title":"Edit project skills langs #106","user":{"login":"MichaelCaraccio","id":7326386,"avatar_url":"https://avatars.githubusercontent.com/u/7326386?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelCaraccio","html_url":"https://github.com/MichaelCaraccio","followers_url":"https://api.github.com/users/MichaelCaraccio/followers","following_url":"https://api.github.com/users/MichaelCaraccio/following{/other_user}","gists_url":"https://api.github.com/users/MichaelCaraccio/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelCaraccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelCaraccio/subscriptions","organizations_url":"https://api.github.com/users/MichaelCaraccio/orgs","repos_url":"https://api.github.com/users/MichaelCaraccio/repos","events_url":"https://api.github.com/users/MichaelCaraccio/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelCaraccio/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-13T23:21:01Z","updated_at":"2016-11-13T23:38:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8b539d28ff6cc4810a5e901aaaa6e9df802f2b4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/110/commits","review_comments_url":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/110/comments","review_comment_url":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ice-blaze/talent-linker/issues/110/comments","statuses_url":"https://api.github.com/repos/ice-blaze/talent-linker/statuses/8464d4c87d616cbe0d5bd11999b5863e14021133","head":{"label":"ice-blaze:edit_project_skills_langs#106","ref":"edit_project_skills_langs#106","sha":"8464d4c87d616cbe0d5bd11999b5863e14021133","user":{"login":"ice-blaze","id":3356843,"avatar_url":"https://avatars.githubusercontent.com/u/3356843?v=3","gravatar_id":"","url":"https://api.github.com/users/ice-blaze","html_url":"https://github.com/ice-blaze","followers_url":"https://api.github.com/users/ice-blaze/followers","following_url":"https://api.github.com/users/ice-blaze/following{/other_user}","gists_url":"https://api.github.com/users/ice-blaze/gists{/gist_id}","starred_url":"https://api.github.com/users/ice-blaze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice-blaze/subscriptions","organizations_url":"https://api.github.com/users/ice-blaze/orgs","repos_url":"https://api.github.com/users/ice-blaze/repos","events_url":"https://api.github.com/users/ice-blaze/events{/privacy}","received_events_url":"https://api.github.com/users/ice-blaze/received_events","type":"User","site_admin":false},"repo":{"id":64129260,"name":"talent-linker","full_name":"ice-blaze/talent-linker","owner":{"login":"ice-blaze","id":3356843,"avatar_url":"https://avatars.githubusercontent.com/u/3356843?v=3","gravatar_id":"","url":"https://api.github.com/users/ice-blaze","html_url":"https://github.com/ice-blaze","followers_url":"https://api.github.com/users/ice-blaze/followers","following_url":"https://api.github.com/users/ice-blaze/following{/other_user}","gists_url":"https://api.github.com/users/ice-blaze/gists{/gist_id}","starred_url":"https://api.github.com/users/ice-blaze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice-blaze/subscriptions","organizations_url":"https://api.github.com/users/ice-blaze/orgs","repos_url":"https://api.github.com/users/ice-blaze/repos","events_url":"https://api.github.com/users/ice-blaze/events{/privacy}","received_events_url":"https://api.github.com/users/ice-blaze/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ice-blaze/talent-linker","description":"Web platform to create connection between different talent, art/dev","fork":false,"url":"https://api.github.com/repos/ice-blaze/talent-linker","forks_url":"https://api.github.com/repos/ice-blaze/talent-linker/forks","keys_url":"https://api.github.com/repos/ice-blaze/talent-linker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ice-blaze/talent-linker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ice-blaze/talent-linker/teams","hooks_url":"https://api.github.com/repos/ice-blaze/talent-linker/hooks","issue_events_url":"https://api.github.com/repos/ice-blaze/talent-linker/issues/events{/number}","events_url":"https://api.github.com/repos/ice-blaze/talent-linker/events","assignees_url":"https://api.github.com/repos/ice-blaze/talent-linker/assignees{/user}","branches_url":"https://api.github.com/repos/ice-blaze/talent-linker/branches{/branch}","tags_url":"https://api.github.com/repos/ice-blaze/talent-linker/tags","blobs_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ice-blaze/talent-linker/statuses/{sha}","languages_url":"https://api.github.com/repos/ice-blaze/talent-linker/languages","stargazers_url":"https://api.github.com/repos/ice-blaze/talent-linker/stargazers","contributors_url":"https://api.github.com/repos/ice-blaze/talent-linker/contributors","subscribers_url":"https://api.github.com/repos/ice-blaze/talent-linker/subscribers","subscription_url":"https://api.github.com/repos/ice-blaze/talent-linker/subscription","commits_url":"https://api.github.com/repos/ice-blaze/talent-linker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ice-blaze/talent-linker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ice-blaze/talent-linker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ice-blaze/talent-linker/contents/{+path}","compare_url":"https://api.github.com/repos/ice-blaze/talent-linker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ice-blaze/talent-linker/merges","archive_url":"https://api.github.com/repos/ice-blaze/talent-linker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ice-blaze/talent-linker/downloads","issues_url":"https://api.github.com/repos/ice-blaze/talent-linker/issues{/number}","pulls_url":"https://api.github.com/repos/ice-blaze/talent-linker/pulls{/number}","milestones_url":"https://api.github.com/repos/ice-blaze/talent-linker/milestones{/number}","notifications_url":"https://api.github.com/repos/ice-blaze/talent-linker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ice-blaze/talent-linker/labels{/name}","releases_url":"https://api.github.com/repos/ice-blaze/talent-linker/releases{/id}","deployments_url":"https://api.github.com/repos/ice-blaze/talent-linker/deployments","created_at":"2016-07-25T11:34:35Z","updated_at":"2016-10-26T09:02:10Z","pushed_at":"2016-11-13T23:32:00Z","git_url":"git://github.com/ice-blaze/talent-linker.git","ssh_url":"git@github.com:ice-blaze/talent-linker.git","clone_url":"https://github.com/ice-blaze/talent-linker.git","svn_url":"https://github.com/ice-blaze/talent-linker","homepage":null,"size":1715,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":20,"forks":1,"open_issues":20,"watchers":1,"default_branch":"develop"}},"base":{"label":"ice-blaze:develop","ref":"develop","sha":"0a29e7877a867aa63ce3b1355981e586757465e5","user":{"login":"ice-blaze","id":3356843,"avatar_url":"https://avatars.githubusercontent.com/u/3356843?v=3","gravatar_id":"","url":"https://api.github.com/users/ice-blaze","html_url":"https://github.com/ice-blaze","followers_url":"https://api.github.com/users/ice-blaze/followers","following_url":"https://api.github.com/users/ice-blaze/following{/other_user}","gists_url":"https://api.github.com/users/ice-blaze/gists{/gist_id}","starred_url":"https://api.github.com/users/ice-blaze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice-blaze/subscriptions","organizations_url":"https://api.github.com/users/ice-blaze/orgs","repos_url":"https://api.github.com/users/ice-blaze/repos","events_url":"https://api.github.com/users/ice-blaze/events{/privacy}","received_events_url":"https://api.github.com/users/ice-blaze/received_events","type":"User","site_admin":false},"repo":{"id":64129260,"name":"talent-linker","full_name":"ice-blaze/talent-linker","owner":{"login":"ice-blaze","id":3356843,"avatar_url":"https://avatars.githubusercontent.com/u/3356843?v=3","gravatar_id":"","url":"https://api.github.com/users/ice-blaze","html_url":"https://github.com/ice-blaze","followers_url":"https://api.github.com/users/ice-blaze/followers","following_url":"https://api.github.com/users/ice-blaze/following{/other_user}","gists_url":"https://api.github.com/users/ice-blaze/gists{/gist_id}","starred_url":"https://api.github.com/users/ice-blaze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice-blaze/subscriptions","organizations_url":"https://api.github.com/users/ice-blaze/orgs","repos_url":"https://api.github.com/users/ice-blaze/repos","events_url":"https://api.github.com/users/ice-blaze/events{/privacy}","received_events_url":"https://api.github.com/users/ice-blaze/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ice-blaze/talent-linker","description":"Web platform to create connection between different talent, art/dev","fork":false,"url":"https://api.github.com/repos/ice-blaze/talent-linker","forks_url":"https://api.github.com/repos/ice-blaze/talent-linker/forks","keys_url":"https://api.github.com/repos/ice-blaze/talent-linker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ice-blaze/talent-linker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ice-blaze/talent-linker/teams","hooks_url":"https://api.github.com/repos/ice-blaze/talent-linker/hooks","issue_events_url":"https://api.github.com/repos/ice-blaze/talent-linker/issues/events{/number}","events_url":"https://api.github.com/repos/ice-blaze/talent-linker/events","assignees_url":"https://api.github.com/repos/ice-blaze/talent-linker/assignees{/user}","branches_url":"https://api.github.com/repos/ice-blaze/talent-linker/branches{/branch}","tags_url":"https://api.github.com/repos/ice-blaze/talent-linker/tags","blobs_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ice-blaze/talent-linker/statuses/{sha}","languages_url":"https://api.github.com/repos/ice-blaze/talent-linker/languages","stargazers_url":"https://api.github.com/repos/ice-blaze/talent-linker/stargazers","contributors_url":"https://api.github.com/repos/ice-blaze/talent-linker/contributors","subscribers_url":"https://api.github.com/repos/ice-blaze/talent-linker/subscribers","subscription_url":"https://api.github.com/repos/ice-blaze/talent-linker/subscription","commits_url":"https://api.github.com/repos/ice-blaze/talent-linker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ice-blaze/talent-linker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ice-blaze/talent-linker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ice-blaze/talent-linker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ice-blaze/talent-linker/contents/{+path}","compare_url":"https://api.github.com/repos/ice-blaze/talent-linker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ice-blaze/talent-linker/merges","archive_url":"https://api.github.com/repos/ice-blaze/talent-linker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ice-blaze/talent-linker/downloads","issues_url":"https://api.github.com/repos/ice-blaze/talent-linker/issues{/number}","pulls_url":"https://api.github.com/repos/ice-blaze/talent-linker/pulls{/number}","milestones_url":"https://api.github.com/repos/ice-blaze/talent-linker/milestones{/number}","notifications_url":"https://api.github.com/repos/ice-blaze/talent-linker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ice-blaze/talent-linker/labels{/name}","releases_url":"https://api.github.com/repos/ice-blaze/talent-linker/releases{/id}","deployments_url":"https://api.github.com/repos/ice-blaze/talent-linker/deployments","created_at":"2016-07-25T11:34:35Z","updated_at":"2016-10-26T09:02:10Z","pushed_at":"2016-11-13T23:32:00Z","git_url":"git://github.com/ice-blaze/talent-linker.git","ssh_url":"git@github.com:ice-blaze/talent-linker.git","clone_url":"https://github.com/ice-blaze/talent-linker.git","svn_url":"https://github.com/ice-blaze/talent-linker","homepage":null,"size":1715,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":20,"forks":1,"open_issues":20,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/110"},"html":{"href":"https://github.com/ice-blaze/talent-linker/pull/110"},"issue":{"href":"https://api.github.com/repos/ice-blaze/talent-linker/issues/110"},"comments":{"href":"https://api.github.com/repos/ice-blaze/talent-linker/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ice-blaze/talent-linker/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/ice-blaze/talent-linker/statuses/8464d4c87d616cbe0d5bd11999b5863e14021133"}}}}
{"actor":{"display_login":"ice-blaze"}}