{"action":"created","issue":{"url":"https://api.github.com/repos/cloudcreativity/laravel-json-api/issues/107","repository_url":"https://api.github.com/repos/cloudcreativity/laravel-json-api","labels_url":"https://api.github.com/repos/cloudcreativity/laravel-json-api/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/cloudcreativity/laravel-json-api/issues/107/comments","events_url":"https://api.github.com/repos/cloudcreativity/laravel-json-api/issues/107/events","html_url":"https://github.com/cloudcreativity/laravel-json-api/issues/107","id":259482832,"number":107,"title":"Non-null boolean values are shown as null when object is created","user":{"login":"danherd","id":659658,"avatar_url":"https://avatars0.githubusercontent.com/u/659658?v=4","gravatar_id":"","url":"https://api.github.com/users/danherd","html_url":"https://github.com/danherd","followers_url":"https://api.github.com/users/danherd/followers","following_url":"https://api.github.com/users/danherd/following{/other_user}","gists_url":"https://api.github.com/users/danherd/gists{/gist_id}","starred_url":"https://api.github.com/users/danherd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danherd/subscriptions","organizations_url":"https://api.github.com/users/danherd/orgs","repos_url":"https://api.github.com/users/danherd/repos","events_url":"https://api.github.com/users/danherd/events{/privacy}","received_events_url":"https://api.github.com/users/danherd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-21T12:44:10Z","updated_at":"2017-09-27T11:13:42Z","closed_at":"2017-09-21T13:56:03Z","author_association":"NONE","body":"The following have been edited for brevity and clarity.\r\n\r\nDatabase:\r\n\r\n```\r\n$table->boolean('accommodation')->unsigned()->default(false);\r\n$table->boolean('transport')->unsigned()->default(false);\r\n$table->boolean('weekends')->unsigned()->default(false);\r\n$table->boolean('night_shifts')->unsigned()->default(false);\r\n```\r\n\r\nPOST:\r\n...\r\n```\r\n\"attributes\": {\r\n    \"accommodation\": true\r\n}\r\n...\r\n```\r\n\r\nResponse (201 Created):\r\n\r\n```\r\n...\r\n\"attributes\": {\r\n    \"accommodation\": true,\r\n    \"transport\": null,\r\n    \"weekends\": null,\r\n    \"night-shifts\": null\r\n}\r\n...\r\n```\r\n\r\nGET:\r\n\r\n```\r\n...\r\n\"attributes\": {\r\n    \"accommodation\": false,\r\n    \"transport\": false,\r\n    \"weekends\": false,\r\n    \"night-shifts\": false\r\n}\r\n...\r\n```\r\n\r\nSurely, the three values that weren't set in the POST should be displayed in the response as 'false' and not null?"},"comment":{"url":"https://api.github.com/repos/cloudcreativity/laravel-json-api/issues/comments/332488502","html_url":"https://github.com/cloudcreativity/laravel-json-api/issues/107#issuecomment-332488502","issue_url":"https://api.github.com/repos/cloudcreativity/laravel-json-api/issues/107","id":332488502,"user":{"login":"danherd","id":659658,"avatar_url":"https://avatars0.githubusercontent.com/u/659658?v=4","gravatar_id":"","url":"https://api.github.com/users/danherd","html_url":"https://github.com/danherd","followers_url":"https://api.github.com/users/danherd/followers","following_url":"https://api.github.com/users/danherd/following{/other_user}","gists_url":"https://api.github.com/users/danherd/gists{/gist_id}","starred_url":"https://api.github.com/users/danherd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danherd/subscriptions","organizations_url":"https://api.github.com/users/danherd/orgs","repos_url":"https://api.github.com/users/danherd/repos","events_url":"https://api.github.com/users/danherd/events{/privacy}","received_events_url":"https://api.github.com/users/danherd/received_events","type":"User","site_admin":false},"created_at":"2017-09-27T11:13:42Z","updated_at":"2017-09-27T11:13:42Z","author_association":"NONE","body":"> Setting default attribute values in the $attributes property will solve it instead.\r\n\r\nIs that in the hydrator class? How is that formatted?"}}
{"actor":{"display_login":"danherd"}}