{"action":"created","comment":{"url":"https://api.github.com/repos/LaravelCollective/html/pulls/comments/67623890","id":67623890,"diff_hunk":"@@ -39,6 +39,10 @@ public function getFormValue($key)\n         // retrieval from the model to a form that is more useful for usage.\n         if ($this->hasFormMutator($key)) {\n             return $this->mutateFormAttribute($key, $value);\n+        } else {\n+\n+            // No form mutator, let the model resolve this\n+            return data_get($this, $key);\n         }\n \n         return $value;","path":"src/Eloquent/FormAccessible.php","position":10,"original_position":10,"commit_id":"0625f71fd937572cf7c49bf5f05e883224803410","original_commit_id":"0625f71fd937572cf7c49bf5f05e883224803410","user":{"login":"arcanedev-maroc","id":3282340,"avatar_url":"https://avatars.githubusercontent.com/u/3282340?v=3","gravatar_id":"","url":"https://api.github.com/users/arcanedev-maroc","html_url":"https://github.com/arcanedev-maroc","followers_url":"https://api.github.com/users/arcanedev-maroc/followers","following_url":"https://api.github.com/users/arcanedev-maroc/following{/other_user}","gists_url":"https://api.github.com/users/arcanedev-maroc/gists{/gist_id}","starred_url":"https://api.github.com/users/arcanedev-maroc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcanedev-maroc/subscriptions","organizations_url":"https://api.github.com/users/arcanedev-maroc/orgs","repos_url":"https://api.github.com/users/arcanedev-maroc/repos","events_url":"https://api.github.com/users/arcanedev-maroc/events{/privacy}","received_events_url":"https://api.github.com/users/arcanedev-maroc/received_events","type":"User","site_admin":false},"body":"How about the `return $value;` ?? It will never reach the last line.","created_at":"2016-06-19T21:11:32Z","updated_at":"2016-06-19T21:11:32Z","html_url":"https://github.com/LaravelCollective/html/pull/191#discussion_r67623890","pull_request_url":"https://api.github.com/repos/LaravelCollective/html/pulls/191","_links":{"self":{"href":"https://api.github.com/repos/LaravelCollective/html/pulls/comments/67623890"},"html":{"href":"https://github.com/LaravelCollective/html/pull/191#discussion_r67623890"},"pull_request":{"href":"https://api.github.com/repos/LaravelCollective/html/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/LaravelCollective/html/pulls/191","id":70638215,"html_url":"https://github.com/LaravelCollective/html/pull/191","diff_url":"https://github.com/LaravelCollective/html/pull/191.diff","patch_url":"https://github.com/LaravelCollective/html/pull/191.patch","issue_url":"https://api.github.com/repos/LaravelCollective/html/issues/191","number":191,"state":"closed","locked":false,"title":"Getting form value from related model","user":{"login":"aygee","id":1481184,"avatar_url":"https://avatars.githubusercontent.com/u/1481184?v=3","gravatar_id":"","url":"https://api.github.com/users/aygee","html_url":"https://github.com/aygee","followers_url":"https://api.github.com/users/aygee/followers","following_url":"https://api.github.com/users/aygee/following{/other_user}","gists_url":"https://api.github.com/users/aygee/gists{/gist_id}","starred_url":"https://api.github.com/users/aygee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aygee/subscriptions","organizations_url":"https://api.github.com/users/aygee/orgs","repos_url":"https://api.github.com/users/aygee/repos","events_url":"https://api.github.com/users/aygee/events{/privacy}","received_events_url":"https://api.github.com/users/aygee/received_events","type":"User","site_admin":false},"body":"When a model is using the FormAccessible trait, it is unable to get the value from related model.\r\n\r\nHere is the example of the code, where address is the related model\r\n`{{ Form::text('address[street1]', null, ['class' => 'form-control']) }}`\r\n\r\n","created_at":"2016-05-19T05:25:42Z","updated_at":"2016-06-19T21:11:32Z","closed_at":"2016-06-19T05:01:55Z","merged_at":"2016-06-19T05:01:55Z","merge_commit_sha":"bcf0697d7dc70989cdfbfeb3270ecece3a80eae5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/LaravelCollective/html/pulls/191/commits","review_comments_url":"https://api.github.com/repos/LaravelCollective/html/pulls/191/comments","review_comment_url":"https://api.github.com/repos/LaravelCollective/html/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LaravelCollective/html/issues/191/comments","statuses_url":"https://api.github.com/repos/LaravelCollective/html/statuses/0625f71fd937572cf7c49bf5f05e883224803410","head":{"label":"aygee:get-form-value-related-model","ref":"get-form-value-related-model","sha":"0625f71fd937572cf7c49bf5f05e883224803410","user":{"login":"aygee","id":1481184,"avatar_url":"https://avatars.githubusercontent.com/u/1481184?v=3","gravatar_id":"","url":"https://api.github.com/users/aygee","html_url":"https://github.com/aygee","followers_url":"https://api.github.com/users/aygee/followers","following_url":"https://api.github.com/users/aygee/following{/other_user}","gists_url":"https://api.github.com/users/aygee/gists{/gist_id}","starred_url":"https://api.github.com/users/aygee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aygee/subscriptions","organizations_url":"https://api.github.com/users/aygee/orgs","repos_url":"https://api.github.com/users/aygee/repos","events_url":"https://api.github.com/users/aygee/events{/privacy}","received_events_url":"https://api.github.com/users/aygee/received_events","type":"User","site_admin":false},"repo":{"id":58802817,"name":"laravelcollective-html","full_name":"aygee/laravelcollective-html","owner":{"login":"aygee","id":1481184,"avatar_url":"https://avatars.githubusercontent.com/u/1481184?v=3","gravatar_id":"","url":"https://api.github.com/users/aygee","html_url":"https://github.com/aygee","followers_url":"https://api.github.com/users/aygee/followers","following_url":"https://api.github.com/users/aygee/following{/other_user}","gists_url":"https://api.github.com/users/aygee/gists{/gist_id}","starred_url":"https://api.github.com/users/aygee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aygee/subscriptions","organizations_url":"https://api.github.com/users/aygee/orgs","repos_url":"https://api.github.com/users/aygee/repos","events_url":"https://api.github.com/users/aygee/events{/privacy}","received_events_url":"https://api.github.com/users/aygee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aygee/laravelcollective-html","description":"HTML and Form Builders for the Laravel Framework","fork":true,"url":"https://api.github.com/repos/aygee/laravelcollective-html","forks_url":"https://api.github.com/repos/aygee/laravelcollective-html/forks","keys_url":"https://api.github.com/repos/aygee/laravelcollective-html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aygee/laravelcollective-html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aygee/laravelcollective-html/teams","hooks_url":"https://api.github.com/repos/aygee/laravelcollective-html/hooks","issue_events_url":"https://api.github.com/repos/aygee/laravelcollective-html/issues/events{/number}","events_url":"https://api.github.com/repos/aygee/laravelcollective-html/events","assignees_url":"https://api.github.com/repos/aygee/laravelcollective-html/assignees{/user}","branches_url":"https://api.github.com/repos/aygee/laravelcollective-html/branches{/branch}","tags_url":"https://api.github.com/repos/aygee/laravelcollective-html/tags","blobs_url":"https://api.github.com/repos/aygee/laravelcollective-html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aygee/laravelcollective-html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aygee/laravelcollective-html/git/refs{/sha}","trees_url":"https://api.github.com/repos/aygee/laravelcollective-html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aygee/laravelcollective-html/statuses/{sha}","languages_url":"https://api.github.com/repos/aygee/laravelcollective-html/languages","stargazers_url":"https://api.github.com/repos/aygee/laravelcollective-html/stargazers","contributors_url":"https://api.github.com/repos/aygee/laravelcollective-html/contributors","subscribers_url":"https://api.github.com/repos/aygee/laravelcollective-html/subscribers","subscription_url":"https://api.github.com/repos/aygee/laravelcollective-html/subscription","commits_url":"https://api.github.com/repos/aygee/laravelcollective-html/commits{/sha}","git_commits_url":"https://api.github.com/repos/aygee/laravelcollective-html/git/commits{/sha}","comments_url":"https://api.github.com/repos/aygee/laravelcollective-html/comments{/number}","issue_comment_url":"https://api.github.com/repos/aygee/laravelcollective-html/issues/comments{/number}","contents_url":"https://api.github.com/repos/aygee/laravelcollective-html/contents/{+path}","compare_url":"https://api.github.com/repos/aygee/laravelcollective-html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aygee/laravelcollective-html/merges","archive_url":"https://api.github.com/repos/aygee/laravelcollective-html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aygee/laravelcollective-html/downloads","issues_url":"https://api.github.com/repos/aygee/laravelcollective-html/issues{/number}","pulls_url":"https://api.github.com/repos/aygee/laravelcollective-html/pulls{/number}","milestones_url":"https://api.github.com/repos/aygee/laravelcollective-html/milestones{/number}","notifications_url":"https://api.github.com/repos/aygee/laravelcollective-html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aygee/laravelcollective-html/labels{/name}","releases_url":"https://api.github.com/repos/aygee/laravelcollective-html/releases{/id}","deployments_url":"https://api.github.com/repos/aygee/laravelcollective-html/deployments","created_at":"2016-05-14T10:43:47Z","updated_at":"2016-05-14T10:57:15Z","pushed_at":"2016-05-19T05:50:11Z","git_url":"git://github.com/aygee/laravelcollective-html.git","ssh_url":"git@github.com:aygee/laravelcollective-html.git","clone_url":"https://github.com/aygee/laravelcollective-html.git","svn_url":"https://github.com/aygee/laravelcollective-html","homepage":null,"size":210,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"5.2"}},"base":{"label":"LaravelCollective:5.2","ref":"5.2","sha":"02c75dff24fa9c306a907816ee6cff8c85a0d96b","user":{"login":"LaravelCollective","id":10841098,"avatar_url":"https://avatars.githubusercontent.com/u/10841098?v=3","gravatar_id":"","url":"https://api.github.com/users/LaravelCollective","html_url":"https://github.com/LaravelCollective","followers_url":"https://api.github.com/users/LaravelCollective/followers","following_url":"https://api.github.com/users/LaravelCollective/following{/other_user}","gists_url":"https://api.github.com/users/LaravelCollective/gists{/gist_id}","starred_url":"https://api.github.com/users/LaravelCollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaravelCollective/subscriptions","organizations_url":"https://api.github.com/users/LaravelCollective/orgs","repos_url":"https://api.github.com/users/LaravelCollective/repos","events_url":"https://api.github.com/users/LaravelCollective/events{/privacy}","received_events_url":"https://api.github.com/users/LaravelCollective/received_events","type":"Organization","site_admin":false},"repo":{"id":30367229,"name":"html","full_name":"LaravelCollective/html","owner":{"login":"LaravelCollective","id":10841098,"avatar_url":"https://avatars.githubusercontent.com/u/10841098?v=3","gravatar_id":"","url":"https://api.github.com/users/LaravelCollective","html_url":"https://github.com/LaravelCollective","followers_url":"https://api.github.com/users/LaravelCollective/followers","following_url":"https://api.github.com/users/LaravelCollective/following{/other_user}","gists_url":"https://api.github.com/users/LaravelCollective/gists{/gist_id}","starred_url":"https://api.github.com/users/LaravelCollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaravelCollective/subscriptions","organizations_url":"https://api.github.com/users/LaravelCollective/orgs","repos_url":"https://api.github.com/users/LaravelCollective/repos","events_url":"https://api.github.com/users/LaravelCollective/events{/privacy}","received_events_url":"https://api.github.com/users/LaravelCollective/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LaravelCollective/html","description":"HTML and Form Builders for the Laravel Framework","fork":false,"url":"https://api.github.com/repos/LaravelCollective/html","forks_url":"https://api.github.com/repos/LaravelCollective/html/forks","keys_url":"https://api.github.com/repos/LaravelCollective/html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LaravelCollective/html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LaravelCollective/html/teams","hooks_url":"https://api.github.com/repos/LaravelCollective/html/hooks","issue_events_url":"https://api.github.com/repos/LaravelCollective/html/issues/events{/number}","events_url":"https://api.github.com/repos/LaravelCollective/html/events","assignees_url":"https://api.github.com/repos/LaravelCollective/html/assignees{/user}","branches_url":"https://api.github.com/repos/LaravelCollective/html/branches{/branch}","tags_url":"https://api.github.com/repos/LaravelCollective/html/tags","blobs_url":"https://api.github.com/repos/LaravelCollective/html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LaravelCollective/html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LaravelCollective/html/git/refs{/sha}","trees_url":"https://api.github.com/repos/LaravelCollective/html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LaravelCollective/html/statuses/{sha}","languages_url":"https://api.github.com/repos/LaravelCollective/html/languages","stargazers_url":"https://api.github.com/repos/LaravelCollective/html/stargazers","contributors_url":"https://api.github.com/repos/LaravelCollective/html/contributors","subscribers_url":"https://api.github.com/repos/LaravelCollective/html/subscribers","subscription_url":"https://api.github.com/repos/LaravelCollective/html/subscription","commits_url":"https://api.github.com/repos/LaravelCollective/html/commits{/sha}","git_commits_url":"https://api.github.com/repos/LaravelCollective/html/git/commits{/sha}","comments_url":"https://api.github.com/repos/LaravelCollective/html/comments{/number}","issue_comment_url":"https://api.github.com/repos/LaravelCollective/html/issues/comments{/number}","contents_url":"https://api.github.com/repos/LaravelCollective/html/contents/{+path}","compare_url":"https://api.github.com/repos/LaravelCollective/html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LaravelCollective/html/merges","archive_url":"https://api.github.com/repos/LaravelCollective/html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LaravelCollective/html/downloads","issues_url":"https://api.github.com/repos/LaravelCollective/html/issues{/number}","pulls_url":"https://api.github.com/repos/LaravelCollective/html/pulls{/number}","milestones_url":"https://api.github.com/repos/LaravelCollective/html/milestones{/number}","notifications_url":"https://api.github.com/repos/LaravelCollective/html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LaravelCollective/html/labels{/name}","releases_url":"https://api.github.com/repos/LaravelCollective/html/releases{/id}","deployments_url":"https://api.github.com/repos/LaravelCollective/html/deployments","created_at":"2015-02-05T17:02:48Z","updated_at":"2016-06-18T18:26:55Z","pushed_at":"2016-06-19T05:01:55Z","git_url":"git://github.com/LaravelCollective/html.git","ssh_url":"git@github.com:LaravelCollective/html.git","clone_url":"https://github.com/LaravelCollective/html.git","svn_url":"https://github.com/LaravelCollective/html","homepage":null,"size":324,"stargazers_count":610,"watchers_count":610,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":172,"mirror_url":null,"open_issues_count":40,"forks":172,"open_issues":40,"watchers":610,"default_branch":"5.2"}},"_links":{"self":{"href":"https://api.github.com/repos/LaravelCollective/html/pulls/191"},"html":{"href":"https://github.com/LaravelCollective/html/pull/191"},"issue":{"href":"https://api.github.com/repos/LaravelCollective/html/issues/191"},"comments":{"href":"https://api.github.com/repos/LaravelCollective/html/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/LaravelCollective/html/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/LaravelCollective/html/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LaravelCollective/html/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/LaravelCollective/html/statuses/0625f71fd937572cf7c49bf5f05e883224803410"}}}}
{"actor":{"display_login":"arcanedev-maroc"}}