{"action":"created","comment":{"url":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/comments/187102469","pull_request_review_id":118811892,"id":187102469,"diff_hunk":"@@ -282,18 +283,24 @@ public function toAudit(): array\n \n         $tags = implode(',', $this->generateTags());\n \n-        return $this->transformAudit([\n+        $data = [\n             'old_values'     => $old,\n             'new_values'     => $new,\n             'event'          => $this->auditEvent,\n             'auditable_id'   => $this->getKey(),\n             'auditable_type' => $this->getMorphClass(),\n-            $userForeignKey  => $this->resolveUser(),\n+            $userForeignKey  => $this->resolveUserId(),","path":"src/Auditable.php","position":22,"original_position":22,"commit_id":"a2076fcae48c13d5f77f385ec8b0be0f6d8e1d60","original_commit_id":"a2076fcae48c13d5f77f385ec8b0be0f6d8e1d60","user":{"login":"quetzyg","id":1413966,"avatar_url":"https://avatars3.githubusercontent.com/u/1413966?v=4","gravatar_id":"","url":"https://api.github.com/users/quetzyg","html_url":"https://github.com/quetzyg","followers_url":"https://api.github.com/users/quetzyg/followers","following_url":"https://api.github.com/users/quetzyg/following{/other_user}","gists_url":"https://api.github.com/users/quetzyg/gists{/gist_id}","starred_url":"https://api.github.com/users/quetzyg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quetzyg/subscriptions","organizations_url":"https://api.github.com/users/quetzyg/orgs","repos_url":"https://api.github.com/users/quetzyg/repos","events_url":"https://api.github.com/users/quetzyg/events{/privacy}","received_events_url":"https://api.github.com/users/quetzyg/received_events","type":"User","site_admin":false},"body":"Then here, we replace\r\n`$this->resolveUserId()`\r\n\r\nwith\r\n\r\n`$user->getAuthIdentifier()`","created_at":"2018-05-09T16:42:12Z","updated_at":"2018-05-09T16:49:30Z","html_url":"https://github.com/owen-it/laravel-auditing/pull/420#discussion_r187102469","pull_request_url":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/420","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/comments/187102469"},"html":{"href":"https://github.com/owen-it/laravel-auditing/pull/420#discussion_r187102469"},"pull_request":{"href":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/420"}}},"pull_request":{"url":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/420","id":186908046,"html_url":"https://github.com/owen-it/laravel-auditing/pull/420","diff_url":"https://github.com/owen-it/laravel-auditing/pull/420.diff","patch_url":"https://github.com/owen-it/laravel-auditing/pull/420.patch","issue_url":"https://api.github.com/repos/owen-it/laravel-auditing/issues/420","number":420,"state":"open","locked":false,"title":"Added (optional) morphable user","user":{"login":"crashkonijn","id":5364802,"avatar_url":"https://avatars1.githubusercontent.com/u/5364802?v=4","gravatar_id":"","url":"https://api.github.com/users/crashkonijn","html_url":"https://github.com/crashkonijn","followers_url":"https://api.github.com/users/crashkonijn/followers","following_url":"https://api.github.com/users/crashkonijn/following{/other_user}","gists_url":"https://api.github.com/users/crashkonijn/gists{/gist_id}","starred_url":"https://api.github.com/users/crashkonijn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crashkonijn/subscriptions","organizations_url":"https://api.github.com/users/crashkonijn/orgs","repos_url":"https://api.github.com/users/crashkonijn/repos","events_url":"https://api.github.com/users/crashkonijn/events{/privacy}","received_events_url":"https://api.github.com/users/crashkonijn/received_events","type":"User","site_admin":false},"body":"## Changes\r\n- Added config option for morphable mode. Everything defaults to 'single mode', to maintain backwards compatibility.\r\n- Added config option for guard order.\r\n- Changed current UserSolver to UserIdSolver.\r\n- Added UserIdSolver and UserClassSolver.\r\n- Added commented value to migration file, which needs to be uncommented for morphable to work.\r\n- Added tests to include new classes.\r\n- Adjusted tests to test both modes.","created_at":"2018-05-09T12:34:35Z","updated_at":"2018-05-09T16:49:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c73b12ad65e516bb4cd154c6a43609d44f4bf5fc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/420/commits","review_comments_url":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/420/comments","review_comment_url":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owen-it/laravel-auditing/issues/420/comments","statuses_url":"https://api.github.com/repos/owen-it/laravel-auditing/statuses/a2076fcae48c13d5f77f385ec8b0be0f6d8e1d60","head":{"label":"Webparking:master","ref":"master","sha":"a2076fcae48c13d5f77f385ec8b0be0f6d8e1d60","user":{"login":"Webparking","id":15359366,"avatar_url":"https://avatars2.githubusercontent.com/u/15359366?v=4","gravatar_id":"","url":"https://api.github.com/users/Webparking","html_url":"https://github.com/Webparking","followers_url":"https://api.github.com/users/Webparking/followers","following_url":"https://api.github.com/users/Webparking/following{/other_user}","gists_url":"https://api.github.com/users/Webparking/gists{/gist_id}","starred_url":"https://api.github.com/users/Webparking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Webparking/subscriptions","organizations_url":"https://api.github.com/users/Webparking/orgs","repos_url":"https://api.github.com/users/Webparking/repos","events_url":"https://api.github.com/users/Webparking/events{/privacy}","received_events_url":"https://api.github.com/users/Webparking/received_events","type":"Organization","site_admin":false},"repo":{"id":132576529,"name":"laravel-auditing","full_name":"Webparking/laravel-auditing","owner":{"login":"Webparking","id":15359366,"avatar_url":"https://avatars2.githubusercontent.com/u/15359366?v=4","gravatar_id":"","url":"https://api.github.com/users/Webparking","html_url":"https://github.com/Webparking","followers_url":"https://api.github.com/users/Webparking/followers","following_url":"https://api.github.com/users/Webparking/following{/other_user}","gists_url":"https://api.github.com/users/Webparking/gists{/gist_id}","starred_url":"https://api.github.com/users/Webparking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Webparking/subscriptions","organizations_url":"https://api.github.com/users/Webparking/orgs","repos_url":"https://api.github.com/users/Webparking/repos","events_url":"https://api.github.com/users/Webparking/events{/privacy}","received_events_url":"https://api.github.com/users/Webparking/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Webparking/laravel-auditing","description":"Record the change log from models in Laravel","fork":true,"url":"https://api.github.com/repos/Webparking/laravel-auditing","forks_url":"https://api.github.com/repos/Webparking/laravel-auditing/forks","keys_url":"https://api.github.com/repos/Webparking/laravel-auditing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Webparking/laravel-auditing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Webparking/laravel-auditing/teams","hooks_url":"https://api.github.com/repos/Webparking/laravel-auditing/hooks","issue_events_url":"https://api.github.com/repos/Webparking/laravel-auditing/issues/events{/number}","events_url":"https://api.github.com/repos/Webparking/laravel-auditing/events","assignees_url":"https://api.github.com/repos/Webparking/laravel-auditing/assignees{/user}","branches_url":"https://api.github.com/repos/Webparking/laravel-auditing/branches{/branch}","tags_url":"https://api.github.com/repos/Webparking/laravel-auditing/tags","blobs_url":"https://api.github.com/repos/Webparking/laravel-auditing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Webparking/laravel-auditing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Webparking/laravel-auditing/git/refs{/sha}","trees_url":"https://api.github.com/repos/Webparking/laravel-auditing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Webparking/laravel-auditing/statuses/{sha}","languages_url":"https://api.github.com/repos/Webparking/laravel-auditing/languages","stargazers_url":"https://api.github.com/repos/Webparking/laravel-auditing/stargazers","contributors_url":"https://api.github.com/repos/Webparking/laravel-auditing/contributors","subscribers_url":"https://api.github.com/repos/Webparking/laravel-auditing/subscribers","subscription_url":"https://api.github.com/repos/Webparking/laravel-auditing/subscription","commits_url":"https://api.github.com/repos/Webparking/laravel-auditing/commits{/sha}","git_commits_url":"https://api.github.com/repos/Webparking/laravel-auditing/git/commits{/sha}","comments_url":"https://api.github.com/repos/Webparking/laravel-auditing/comments{/number}","issue_comment_url":"https://api.github.com/repos/Webparking/laravel-auditing/issues/comments{/number}","contents_url":"https://api.github.com/repos/Webparking/laravel-auditing/contents/{+path}","compare_url":"https://api.github.com/repos/Webparking/laravel-auditing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Webparking/laravel-auditing/merges","archive_url":"https://api.github.com/repos/Webparking/laravel-auditing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Webparking/laravel-auditing/downloads","issues_url":"https://api.github.com/repos/Webparking/laravel-auditing/issues{/number}","pulls_url":"https://api.github.com/repos/Webparking/laravel-auditing/pulls{/number}","milestones_url":"https://api.github.com/repos/Webparking/laravel-auditing/milestones{/number}","notifications_url":"https://api.github.com/repos/Webparking/laravel-auditing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Webparking/laravel-auditing/labels{/name}","releases_url":"https://api.github.com/repos/Webparking/laravel-auditing/releases{/id}","deployments_url":"https://api.github.com/repos/Webparking/laravel-auditing/deployments","created_at":"2018-05-08T08:13:46Z","updated_at":"2018-05-09T12:54:46Z","pushed_at":"2018-05-09T12:54:44Z","git_url":"git://github.com/Webparking/laravel-auditing.git","ssh_url":"git@github.com:Webparking/laravel-auditing.git","clone_url":"https://github.com/Webparking/laravel-auditing.git","svn_url":"https://github.com/Webparking/laravel-auditing","homepage":"http://laravel-auditing.com","size":612,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"owen-it:master","ref":"master","sha":"ec2e490d77f4e030f296e90b944c07deb10bef2e","user":{"login":"owen-it","id":13595876,"avatar_url":"https://avatars2.githubusercontent.com/u/13595876?v=4","gravatar_id":"","url":"https://api.github.com/users/owen-it","html_url":"https://github.com/owen-it","followers_url":"https://api.github.com/users/owen-it/followers","following_url":"https://api.github.com/users/owen-it/following{/other_user}","gists_url":"https://api.github.com/users/owen-it/gists{/gist_id}","starred_url":"https://api.github.com/users/owen-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owen-it/subscriptions","organizations_url":"https://api.github.com/users/owen-it/orgs","repos_url":"https://api.github.com/users/owen-it/repos","events_url":"https://api.github.com/users/owen-it/events{/privacy}","received_events_url":"https://api.github.com/users/owen-it/received_events","type":"Organization","site_admin":false},"repo":{"id":41092552,"name":"laravel-auditing","full_name":"owen-it/laravel-auditing","owner":{"login":"owen-it","id":13595876,"avatar_url":"https://avatars2.githubusercontent.com/u/13595876?v=4","gravatar_id":"","url":"https://api.github.com/users/owen-it","html_url":"https://github.com/owen-it","followers_url":"https://api.github.com/users/owen-it/followers","following_url":"https://api.github.com/users/owen-it/following{/other_user}","gists_url":"https://api.github.com/users/owen-it/gists{/gist_id}","starred_url":"https://api.github.com/users/owen-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owen-it/subscriptions","organizations_url":"https://api.github.com/users/owen-it/orgs","repos_url":"https://api.github.com/users/owen-it/repos","events_url":"https://api.github.com/users/owen-it/events{/privacy}","received_events_url":"https://api.github.com/users/owen-it/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owen-it/laravel-auditing","description":"Record the change log from models in Laravel","fork":false,"url":"https://api.github.com/repos/owen-it/laravel-auditing","forks_url":"https://api.github.com/repos/owen-it/laravel-auditing/forks","keys_url":"https://api.github.com/repos/owen-it/laravel-auditing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owen-it/laravel-auditing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owen-it/laravel-auditing/teams","hooks_url":"https://api.github.com/repos/owen-it/laravel-auditing/hooks","issue_events_url":"https://api.github.com/repos/owen-it/laravel-auditing/issues/events{/number}","events_url":"https://api.github.com/repos/owen-it/laravel-auditing/events","assignees_url":"https://api.github.com/repos/owen-it/laravel-auditing/assignees{/user}","branches_url":"https://api.github.com/repos/owen-it/laravel-auditing/branches{/branch}","tags_url":"https://api.github.com/repos/owen-it/laravel-auditing/tags","blobs_url":"https://api.github.com/repos/owen-it/laravel-auditing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owen-it/laravel-auditing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owen-it/laravel-auditing/git/refs{/sha}","trees_url":"https://api.github.com/repos/owen-it/laravel-auditing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owen-it/laravel-auditing/statuses/{sha}","languages_url":"https://api.github.com/repos/owen-it/laravel-auditing/languages","stargazers_url":"https://api.github.com/repos/owen-it/laravel-auditing/stargazers","contributors_url":"https://api.github.com/repos/owen-it/laravel-auditing/contributors","subscribers_url":"https://api.github.com/repos/owen-it/laravel-auditing/subscribers","subscription_url":"https://api.github.com/repos/owen-it/laravel-auditing/subscription","commits_url":"https://api.github.com/repos/owen-it/laravel-auditing/commits{/sha}","git_commits_url":"https://api.github.com/repos/owen-it/laravel-auditing/git/commits{/sha}","comments_url":"https://api.github.com/repos/owen-it/laravel-auditing/comments{/number}","issue_comment_url":"https://api.github.com/repos/owen-it/laravel-auditing/issues/comments{/number}","contents_url":"https://api.github.com/repos/owen-it/laravel-auditing/contents/{+path}","compare_url":"https://api.github.com/repos/owen-it/laravel-auditing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owen-it/laravel-auditing/merges","archive_url":"https://api.github.com/repos/owen-it/laravel-auditing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owen-it/laravel-auditing/downloads","issues_url":"https://api.github.com/repos/owen-it/laravel-auditing/issues{/number}","pulls_url":"https://api.github.com/repos/owen-it/laravel-auditing/pulls{/number}","milestones_url":"https://api.github.com/repos/owen-it/laravel-auditing/milestones{/number}","notifications_url":"https://api.github.com/repos/owen-it/laravel-auditing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owen-it/laravel-auditing/labels{/name}","releases_url":"https://api.github.com/repos/owen-it/laravel-auditing/releases{/id}","deployments_url":"https://api.github.com/repos/owen-it/laravel-auditing/deployments","created_at":"2015-08-20T11:39:51Z","updated_at":"2018-05-09T00:24:41Z","pushed_at":"2018-05-09T12:54:46Z","git_url":"git://github.com/owen-it/laravel-auditing.git","ssh_url":"git@github.com:owen-it/laravel-auditing.git","clone_url":"https://github.com/owen-it/laravel-auditing.git","svn_url":"https://github.com/owen-it/laravel-auditing","homepage":"http://laravel-auditing.com","size":586,"stargazers_count":896,"watchers_count":896,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":119,"open_issues":2,"watchers":896,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/420"},"html":{"href":"https://github.com/owen-it/laravel-auditing/pull/420"},"issue":{"href":"https://api.github.com/repos/owen-it/laravel-auditing/issues/420"},"comments":{"href":"https://api.github.com/repos/owen-it/laravel-auditing/issues/420/comments"},"review_comments":{"href":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/420/comments"},"review_comment":{"href":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owen-it/laravel-auditing/pulls/420/commits"},"statuses":{"href":"https://api.github.com/repos/owen-it/laravel-auditing/statuses/a2076fcae48c13d5f77f385ec8b0be0f6d8e1d60"}},"author_association":"NONE"}}
{"actor":{"display_login":"quetzyg"}}