{"action":"created","comment":{"url":"https://api.github.com/repos/spira/spira/pulls/comments/33219646","id":33219646,"diff_hunk":"@@ -3,12 +3,37 @@\n use Illuminate\\Database\\Eloquent\\Model;\n use Bosnadev\\Database\\Traits\\UuidTrait;\n \n-class BaseModel extends Model\n+abstract class BaseModel extends Model\n {\n     use UuidTrait;\n \n     public $incrementing = false;\n \n+    /**\n+     * The accessors to append to the model's array form.\n+     *\n+     * @var array\n+     */\n+    protected $appends = ['self'];\n+\n+    /**\n+     * Get the access route for the entity.\n+     *\n+     * @return string\n+     */\n+    abstract public function entityRoute();\n+\n+    /**\n+     * Get the user's first name.\n+     *\n+     * @param  string  $value\n+     * @return string\n+     */\n+    public function getSelfAttribute()\n+    {\n+        return url($this->entityRoute().'/'.$this->{$this->primaryKey});\n+    }\n+\n     public static function getTableName()","path":"api/app/Models/BaseModel.php","position":36,"original_position":36,"commit_id":"f9cd6981155614fa8a0de7d38096846c6bc6a1ab","original_commit_id":"f9cd6981155614fa8a0de7d38096846c6bc6a1ab","user":{"login":"artstorm","id":1165965,"avatar_url":"https://avatars.githubusercontent.com/u/1165965?v=3","gravatar_id":"","url":"https://api.github.com/users/artstorm","html_url":"https://github.com/artstorm","followers_url":"https://api.github.com/users/artstorm/followers","following_url":"https://api.github.com/users/artstorm/following{/other_user}","gists_url":"https://api.github.com/users/artstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/artstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artstorm/subscriptions","organizations_url":"https://api.github.com/users/artstorm/orgs","repos_url":"https://api.github.com/users/artstorm/repos","events_url":"https://api.github.com/users/artstorm/events{/privacy}","received_events_url":"https://api.github.com/users/artstorm/received_events","type":"User","site_admin":false},"body":"Yes, this is testable, I'll add that.","created_at":"2015-06-25T03:35:46Z","updated_at":"2015-06-25T03:35:46Z","html_url":"https://github.com/spira/spira/pull/60#discussion_r33219646","pull_request_url":"https://api.github.com/repos/spira/spira/pulls/60","_links":{"self":{"href":"https://api.github.com/repos/spira/spira/pulls/comments/33219646"},"html":{"href":"https://github.com/spira/spira/pull/60#discussion_r33219646"},"pull_request":{"href":"https://api.github.com/repos/spira/spira/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/spira/spira/pulls/60","id":38504923,"html_url":"https://github.com/spira/spira/pull/60","diff_url":"https://github.com/spira/spira/pull/60.diff","patch_url":"https://github.com/spira/spira/pull/60.patch","issue_url":"https://api.github.com/repos/spira/spira/issues/60","number":60,"state":"open","locked":false,"title":"Feature/rest crud","user":{"login":"artstorm","id":1165965,"avatar_url":"https://avatars.githubusercontent.com/u/1165965?v=3","gravatar_id":"","url":"https://api.github.com/users/artstorm","html_url":"https://github.com/artstorm","followers_url":"https://api.github.com/users/artstorm/followers","following_url":"https://api.github.com/users/artstorm/following{/other_user}","gists_url":"https://api.github.com/users/artstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/artstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artstorm/subscriptions","organizations_url":"https://api.github.com/users/artstorm/orgs","repos_url":"https://api.github.com/users/artstorm/repos","events_url":"https://api.github.com/users/artstorm/events{/privacy}","received_events_url":"https://api.github.com/users/artstorm/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-25T01:39:43Z","updated_at":"2015-06-25T03:35:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c38f4152890d21a3e30735055352082e1a3d2154","assignee":{"login":"artstorm","id":1165965,"avatar_url":"https://avatars.githubusercontent.com/u/1165965?v=3","gravatar_id":"","url":"https://api.github.com/users/artstorm","html_url":"https://github.com/artstorm","followers_url":"https://api.github.com/users/artstorm/followers","following_url":"https://api.github.com/users/artstorm/following{/other_user}","gists_url":"https://api.github.com/users/artstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/artstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artstorm/subscriptions","organizations_url":"https://api.github.com/users/artstorm/orgs","repos_url":"https://api.github.com/users/artstorm/repos","events_url":"https://api.github.com/users/artstorm/events{/privacy}","received_events_url":"https://api.github.com/users/artstorm/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/spira/spira/pulls/60/commits","review_comments_url":"https://api.github.com/repos/spira/spira/pulls/60/comments","review_comment_url":"https://api.github.com/repos/spira/spira/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spira/spira/issues/60/comments","statuses_url":"https://api.github.com/repos/spira/spira/statuses/f9cd6981155614fa8a0de7d38096846c6bc6a1ab","head":{"label":"spira:feature/rest-crud","ref":"feature/rest-crud","sha":"f9cd6981155614fa8a0de7d38096846c6bc6a1ab","user":{"login":"spira","id":12660367,"avatar_url":"https://avatars.githubusercontent.com/u/12660367?v=3","gravatar_id":"","url":"https://api.github.com/users/spira","html_url":"https://github.com/spira","followers_url":"https://api.github.com/users/spira/followers","following_url":"https://api.github.com/users/spira/following{/other_user}","gists_url":"https://api.github.com/users/spira/gists{/gist_id}","starred_url":"https://api.github.com/users/spira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spira/subscriptions","organizations_url":"https://api.github.com/users/spira/orgs","repos_url":"https://api.github.com/users/spira/repos","events_url":"https://api.github.com/users/spira/events{/privacy}","received_events_url":"https://api.github.com/users/spira/received_events","type":"Organization","site_admin":false},"repo":{"id":35469223,"name":"spira","full_name":"spira/spira","owner":{"login":"spira","id":12660367,"avatar_url":"https://avatars.githubusercontent.com/u/12660367?v=3","gravatar_id":"","url":"https://api.github.com/users/spira","html_url":"https://github.com/spira","followers_url":"https://api.github.com/users/spira/followers","following_url":"https://api.github.com/users/spira/following{/other_user}","gists_url":"https://api.github.com/users/spira/gists{/gist_id}","starred_url":"https://api.github.com/users/spira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spira/subscriptions","organizations_url":"https://api.github.com/users/spira/orgs","repos_url":"https://api.github.com/users/spira/repos","events_url":"https://api.github.com/users/spira/events{/privacy}","received_events_url":"https://api.github.com/users/spira/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spira/spira","description":"Lumen + AngularJS with Docker project seed","fork":false,"url":"https://api.github.com/repos/spira/spira","forks_url":"https://api.github.com/repos/spira/spira/forks","keys_url":"https://api.github.com/repos/spira/spira/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spira/spira/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spira/spira/teams","hooks_url":"https://api.github.com/repos/spira/spira/hooks","issue_events_url":"https://api.github.com/repos/spira/spira/issues/events{/number}","events_url":"https://api.github.com/repos/spira/spira/events","assignees_url":"https://api.github.com/repos/spira/spira/assignees{/user}","branches_url":"https://api.github.com/repos/spira/spira/branches{/branch}","tags_url":"https://api.github.com/repos/spira/spira/tags","blobs_url":"https://api.github.com/repos/spira/spira/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spira/spira/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spira/spira/git/refs{/sha}","trees_url":"https://api.github.com/repos/spira/spira/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spira/spira/statuses/{sha}","languages_url":"https://api.github.com/repos/spira/spira/languages","stargazers_url":"https://api.github.com/repos/spira/spira/stargazers","contributors_url":"https://api.github.com/repos/spira/spira/contributors","subscribers_url":"https://api.github.com/repos/spira/spira/subscribers","subscription_url":"https://api.github.com/repos/spira/spira/subscription","commits_url":"https://api.github.com/repos/spira/spira/commits{/sha}","git_commits_url":"https://api.github.com/repos/spira/spira/git/commits{/sha}","comments_url":"https://api.github.com/repos/spira/spira/comments{/number}","issue_comment_url":"https://api.github.com/repos/spira/spira/issues/comments{/number}","contents_url":"https://api.github.com/repos/spira/spira/contents/{+path}","compare_url":"https://api.github.com/repos/spira/spira/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spira/spira/merges","archive_url":"https://api.github.com/repos/spira/spira/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spira/spira/downloads","issues_url":"https://api.github.com/repos/spira/spira/issues{/number}","pulls_url":"https://api.github.com/repos/spira/spira/pulls{/number}","milestones_url":"https://api.github.com/repos/spira/spira/milestones{/number}","notifications_url":"https://api.github.com/repos/spira/spira/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spira/spira/labels{/name}","releases_url":"https://api.github.com/repos/spira/spira/releases{/id}","created_at":"2015-05-12T05:44:10Z","updated_at":"2015-06-18T23:54:38Z","pushed_at":"2015-06-25T01:39:43Z","git_url":"git://github.com/spira/spira.git","ssh_url":"git@github.com:spira/spira.git","clone_url":"https://github.com/spira/spira.git","svn_url":"https://github.com/spira/spira","homepage":"http://spira.github.io","size":1578,"stargazers_count":6,"watchers_count":6,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":6,"default_branch":"master"}},"base":{"label":"spira:master","ref":"master","sha":"0dccb3acd413f4d607d10278b7c4797b10195719","user":{"login":"spira","id":12660367,"avatar_url":"https://avatars.githubusercontent.com/u/12660367?v=3","gravatar_id":"","url":"https://api.github.com/users/spira","html_url":"https://github.com/spira","followers_url":"https://api.github.com/users/spira/followers","following_url":"https://api.github.com/users/spira/following{/other_user}","gists_url":"https://api.github.com/users/spira/gists{/gist_id}","starred_url":"https://api.github.com/users/spira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spira/subscriptions","organizations_url":"https://api.github.com/users/spira/orgs","repos_url":"https://api.github.com/users/spira/repos","events_url":"https://api.github.com/users/spira/events{/privacy}","received_events_url":"https://api.github.com/users/spira/received_events","type":"Organization","site_admin":false},"repo":{"id":35469223,"name":"spira","full_name":"spira/spira","owner":{"login":"spira","id":12660367,"avatar_url":"https://avatars.githubusercontent.com/u/12660367?v=3","gravatar_id":"","url":"https://api.github.com/users/spira","html_url":"https://github.com/spira","followers_url":"https://api.github.com/users/spira/followers","following_url":"https://api.github.com/users/spira/following{/other_user}","gists_url":"https://api.github.com/users/spira/gists{/gist_id}","starred_url":"https://api.github.com/users/spira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spira/subscriptions","organizations_url":"https://api.github.com/users/spira/orgs","repos_url":"https://api.github.com/users/spira/repos","events_url":"https://api.github.com/users/spira/events{/privacy}","received_events_url":"https://api.github.com/users/spira/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spira/spira","description":"Lumen + AngularJS with Docker project seed","fork":false,"url":"https://api.github.com/repos/spira/spira","forks_url":"https://api.github.com/repos/spira/spira/forks","keys_url":"https://api.github.com/repos/spira/spira/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spira/spira/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spira/spira/teams","hooks_url":"https://api.github.com/repos/spira/spira/hooks","issue_events_url":"https://api.github.com/repos/spira/spira/issues/events{/number}","events_url":"https://api.github.com/repos/spira/spira/events","assignees_url":"https://api.github.com/repos/spira/spira/assignees{/user}","branches_url":"https://api.github.com/repos/spira/spira/branches{/branch}","tags_url":"https://api.github.com/repos/spira/spira/tags","blobs_url":"https://api.github.com/repos/spira/spira/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spira/spira/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spira/spira/git/refs{/sha}","trees_url":"https://api.github.com/repos/spira/spira/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spira/spira/statuses/{sha}","languages_url":"https://api.github.com/repos/spira/spira/languages","stargazers_url":"https://api.github.com/repos/spira/spira/stargazers","contributors_url":"https://api.github.com/repos/spira/spira/contributors","subscribers_url":"https://api.github.com/repos/spira/spira/subscribers","subscription_url":"https://api.github.com/repos/spira/spira/subscription","commits_url":"https://api.github.com/repos/spira/spira/commits{/sha}","git_commits_url":"https://api.github.com/repos/spira/spira/git/commits{/sha}","comments_url":"https://api.github.com/repos/spira/spira/comments{/number}","issue_comment_url":"https://api.github.com/repos/spira/spira/issues/comments{/number}","contents_url":"https://api.github.com/repos/spira/spira/contents/{+path}","compare_url":"https://api.github.com/repos/spira/spira/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spira/spira/merges","archive_url":"https://api.github.com/repos/spira/spira/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spira/spira/downloads","issues_url":"https://api.github.com/repos/spira/spira/issues{/number}","pulls_url":"https://api.github.com/repos/spira/spira/pulls{/number}","milestones_url":"https://api.github.com/repos/spira/spira/milestones{/number}","notifications_url":"https://api.github.com/repos/spira/spira/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spira/spira/labels{/name}","releases_url":"https://api.github.com/repos/spira/spira/releases{/id}","created_at":"2015-05-12T05:44:10Z","updated_at":"2015-06-18T23:54:38Z","pushed_at":"2015-06-25T01:39:43Z","git_url":"git://github.com/spira/spira.git","ssh_url":"git@github.com:spira/spira.git","clone_url":"https://github.com/spira/spira.git","svn_url":"https://github.com/spira/spira","homepage":"http://spira.github.io","size":1578,"stargazers_count":6,"watchers_count":6,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spira/spira/pulls/60"},"html":{"href":"https://github.com/spira/spira/pull/60"},"issue":{"href":"https://api.github.com/repos/spira/spira/issues/60"},"comments":{"href":"https://api.github.com/repos/spira/spira/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/spira/spira/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/spira/spira/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spira/spira/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/spira/spira/statuses/f9cd6981155614fa8a0de7d38096846c6bc6a1ab"}}}}