{"action":"created","issue":{"url":"https://api.github.com/repos/JosephSilber/bouncer/issues/99","repository_url":"https://api.github.com/repos/JosephSilber/bouncer","labels_url":"https://api.github.com/repos/JosephSilber/bouncer/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/JosephSilber/bouncer/issues/99/comments","events_url":"https://api.github.com/repos/JosephSilber/bouncer/issues/99/events","html_url":"https://github.com/JosephSilber/bouncer/issues/99","id":159640158,"number":99,"title":"Some Eloquent methods will no longer function","user":{"login":"fredrkr","id":351744,"avatar_url":"https://avatars.githubusercontent.com/u/351744?v=3","gravatar_id":"","url":"https://api.github.com/users/fredrkr","html_url":"https://github.com/fredrkr","followers_url":"https://api.github.com/users/fredrkr/followers","following_url":"https://api.github.com/users/fredrkr/following{/other_user}","gists_url":"https://api.github.com/users/fredrkr/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrkr/subscriptions","organizations_url":"https://api.github.com/users/fredrkr/orgs","repos_url":"https://api.github.com/users/fredrkr/repos","events_url":"https://api.github.com/users/fredrkr/events{/privacy}","received_events_url":"https://api.github.com/users/fredrkr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JosephSilber/bouncer/labels/support","name":"support","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-06-10T13:53:56Z","updated_at":"2016-07-20T13:58:24Z","closed_at":"2016-07-20T13:58:23Z","body":"Thanks for your great work with Bouncer so far.\r\n\r\nIn your recent 1.0 pre-release, you changed the schema quite a bit. One change created a lot of extra work in my case.\r\n\r\nI have a GUI for creating a role and associating various abilities with that role (in the form of checkboxes). In my controller, I end up with an array of ability-ids that I need to associate with a certain role. There really is no better way of doing this than calling ``` $role->abilities()->sync($abilityIdsArr)```. The Bouncer-facade, offers no equivalent of this method, and rightly so, since Eloquent has the sync-method.\r\n\r\nThis was working fine up until the schema was changed. For some reason the \"entity_type\"-column in the permissions-table is simply 'roles' when pointing to a role. A regular polymorphic relationship in Eloquent, needs the FQCN to the model to which the entity is related, for instance 'App\\Models\\Ability'. Due to this change, effectively I can no longer use n:m Eloquent-methods in the way I used to. \r\n\r\nIs the entity_type-column supposed to be just \"roles\" in the permissions-table in these instances?"},"comment":{"url":"https://api.github.com/repos/JosephSilber/bouncer/issues/comments/233957111","html_url":"https://github.com/JosephSilber/bouncer/issues/99#issuecomment-233957111","issue_url":"https://api.github.com/repos/JosephSilber/bouncer/issues/99","id":233957111,"user":{"login":"fredrkr","id":351744,"avatar_url":"https://avatars.githubusercontent.com/u/351744?v=3","gravatar_id":"","url":"https://api.github.com/users/fredrkr","html_url":"https://github.com/fredrkr","followers_url":"https://api.github.com/users/fredrkr/followers","following_url":"https://api.github.com/users/fredrkr/following{/other_user}","gists_url":"https://api.github.com/users/fredrkr/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrkr/subscriptions","organizations_url":"https://api.github.com/users/fredrkr/orgs","repos_url":"https://api.github.com/users/fredrkr/repos","events_url":"https://api.github.com/users/fredrkr/events{/privacy}","received_events_url":"https://api.github.com/users/fredrkr/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T13:58:23Z","updated_at":"2016-07-20T13:58:23Z","body":"> I still don't want a config file.\r\n\r\nWhy? I mean, I'm just curious about your reasoning behind your aversion to config-files beyond just \"they're ugly\".\r\n\r\nAnyway, after a bit more testing, I've found that the correct FQCN is saved and everything works as long as I do not touch the morphMap as you first suggested, but instead, use the methods you mentioned (```useRoleModel()```, ```useAbilityModel()```).\r\n\r\nThanks for your help! :)"}}
{"actor":{"display_login":"fredrkr"}}