{"action":"opened","issue":{"url":"https://api.github.com/repos/mopo922/LaravelTreats/issues/11","repository_url":"https://api.github.com/repos/mopo922/LaravelTreats","labels_url":"https://api.github.com/repos/mopo922/LaravelTreats/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/mopo922/LaravelTreats/issues/11/comments","events_url":"https://api.github.com/repos/mopo922/LaravelTreats/issues/11/events","html_url":"https://github.com/mopo922/LaravelTreats/issues/11","id":335961097,"node_id":"MDU6SXNzdWUzMzU5NjEwOTc=","number":11,"title":"not working with hasOne?","user":{"login":"Cipa","id":293377,"node_id":"MDQ6VXNlcjI5MzM3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/293377?v=4","gravatar_id":"","url":"https://api.github.com/users/Cipa","html_url":"https://github.com/Cipa","followers_url":"https://api.github.com/users/Cipa/followers","following_url":"https://api.github.com/users/Cipa/following{/other_user}","gists_url":"https://api.github.com/users/Cipa/gists{/gist_id}","starred_url":"https://api.github.com/users/Cipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cipa/subscriptions","organizations_url":"https://api.github.com/users/Cipa/orgs","repos_url":"https://api.github.com/users/Cipa/repos","events_url":"https://api.github.com/users/Cipa/events{/privacy}","received_events_url":"https://api.github.com/users/Cipa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-26T19:32:32Z","updated_at":"2018-06-26T19:32:32Z","closed_at":null,"author_association":"NONE","body":"I am not sure how to make it work with hasOne\r\n\r\nCode is \r\n\r\n`Program::with('type')->find(['id' => 1, 'year' => 2018]);`\r\n\r\nin the model\r\n```\r\npublic function type()\r\n    {\r\n        return $this->hasOne('Type', 'id', 'type_id');\r\n    }\r\n```\r\n\r\nI get \r\n\r\n```\r\nA PHP Error was encountered\r\n\r\nSeverity: Notice\r\n\r\nMessage: Array to string conversion\r\n\r\nFilename: Eloquent/Model.php\r\n\r\nLine Number: 1149\r\n```\r\n\r\n+ \r\n\r\n```\r\nAn uncaught Exception was encountered\r\n\r\nType: Illuminate\\Database\\QueryException\r\n\r\nMessage: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'programs.Array' in 'where clause' (SQL: select * from `programs` where `programs`.`Array` in (1, 2018))\r\n\r\nFilename: /shared/httpd/humber/hq/application/vendor/illuminate/database/Connection.php\r\n\r\nLine Number: 647\r\n```\r\n\r\nThanks\r\n\r\nPS: I saw there might be a new version coming soon, how soon?"}}
{"actor":{"display_login":"Cipa"}}