{"action":"opened","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/9559","labels_url":"https://api.github.com/repos/laravel/framework/issues/9559/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/9559/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/9559/events","html_url":"https://github.com/laravel/framework/issues/9559","id":93686868,"number":9559,"title":"Inconsistent relation dynamic properties","user":{"login":"meetraz","id":1972728,"avatar_url":"https://avatars.githubusercontent.com/u/1972728?v=3","gravatar_id":"","url":"https://api.github.com/users/meetraz","html_url":"https://github.com/meetraz","followers_url":"https://api.github.com/users/meetraz/followers","following_url":"https://api.github.com/users/meetraz/following{/other_user}","gists_url":"https://api.github.com/users/meetraz/gists{/gist_id}","starred_url":"https://api.github.com/users/meetraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meetraz/subscriptions","organizations_url":"https://api.github.com/users/meetraz/orgs","repos_url":"https://api.github.com/users/meetraz/repos","events_url":"https://api.github.com/users/meetraz/events{/privacy}","received_events_url":"https://api.github.com/users/meetraz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-08T03:59:10Z","updated_at":"2015-07-08T03:59:10Z","closed_at":null,"body":"On the model, __isset() returns false for dynamic properties before they are accessed.  For example:\r\n\r\n```php\r\nisset($book->author);  // false\r\n$author = $book->author;\r\nisset($book->author);  // now true\r\n```\r\n\r\nThis is internally inconsistent, since the Model __isset() returns true for properties that do not exist, but have a GetMutator.  It should also return true for properties that do not exist \"yet\" but have a matching relationship accessor.\r\n\r\nThis is currently a big problem for us, since Twig will error on statements like ` {{ book.author.name }} ` because it checks if \"author\" is a property or method, and both are false.   This pretty much makes Twig unusable with Laravel unless you fill up your controllers with dummy statements to vivify any relationship properties your view might need.\r\n\r\n\r\n"}}