{"action":"created","issue":{"url":"https://api.github.com/repos/spatie/laravel-binary-uuid/issues/39","repository_url":"https://api.github.com/repos/spatie/laravel-binary-uuid","labels_url":"https://api.github.com/repos/spatie/laravel-binary-uuid/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/spatie/laravel-binary-uuid/issues/39/comments","events_url":"https://api.github.com/repos/spatie/laravel-binary-uuid/issues/39/events","html_url":"https://github.com/spatie/laravel-binary-uuid/issues/39","id":300995127,"number":39,"title":"Model using the HasBinaryUuid trait is not booted correctly","user":{"login":"andrzejkupczyk","id":11018286,"avatar_url":"https://avatars1.githubusercontent.com/u/11018286?v=4","gravatar_id":"","url":"https://api.github.com/users/andrzejkupczyk","html_url":"https://github.com/andrzejkupczyk","followers_url":"https://api.github.com/users/andrzejkupczyk/followers","following_url":"https://api.github.com/users/andrzejkupczyk/following{/other_user}","gists_url":"https://api.github.com/users/andrzejkupczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/andrzejkupczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrzejkupczyk/subscriptions","organizations_url":"https://api.github.com/users/andrzejkupczyk/orgs","repos_url":"https://api.github.com/users/andrzejkupczyk/repos","events_url":"https://api.github.com/users/andrzejkupczyk/events{/privacy}","received_events_url":"https://api.github.com/users/andrzejkupczyk/received_events","type":"User","site_admin":false},"labels":[{"id":752162630,"url":"https://api.github.com/repos/spatie/laravel-binary-uuid/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-28T11:50:52Z","updated_at":"2018-02-28T13:32:49Z","closed_at":null,"author_association":"NONE","body":"Problem occurs when you try to convert newly created model instance to an array:\r\n```php\r\n(new App\\SomeModel(['foobar' => 'whatever']))->toArray();\r\n```\r\n```\r\nTypeError: Argument 1 passed to App\\SomeModel::decodeUuid() must be of the type string, null given, called in […]/vendor/spatie/laravel-binary-uuid/src/HasBinaryUuid.php on line 81\r\n```\r\nThis happens because `toArray()` tries to get an \"uuid text\" attribute which is `null` at this point:\r\n```php\r\npublic function getUuidTextAttribute(): string\r\n{\r\n    return static::decodeUuid($this->{$this->getKeyName()});\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/spatie/laravel-binary-uuid/issues/comments/369239961","html_url":"https://github.com/spatie/laravel-binary-uuid/issues/39#issuecomment-369239961","issue_url":"https://api.github.com/repos/spatie/laravel-binary-uuid/issues/39","id":369239961,"user":{"login":"andrzejkupczyk","id":11018286,"avatar_url":"https://avatars1.githubusercontent.com/u/11018286?v=4","gravatar_id":"","url":"https://api.github.com/users/andrzejkupczyk","html_url":"https://github.com/andrzejkupczyk","followers_url":"https://api.github.com/users/andrzejkupczyk/followers","following_url":"https://api.github.com/users/andrzejkupczyk/following{/other_user}","gists_url":"https://api.github.com/users/andrzejkupczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/andrzejkupczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrzejkupczyk/subscriptions","organizations_url":"https://api.github.com/users/andrzejkupczyk/orgs","repos_url":"https://api.github.com/users/andrzejkupczyk/repos","events_url":"https://api.github.com/users/andrzejkupczyk/events{/privacy}","received_events_url":"https://api.github.com/users/andrzejkupczyk/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T13:32:49Z","updated_at":"2018-02-28T13:32:49Z","author_association":"NONE","body":"Okie dokie, it's done."}}
{"actor":{"display_login":"andrzejkupczyk"}}