{"action":"created","issue":{"url":"https://api.github.com/repos/kodeine/laravel-acl/issues/5","labels_url":"https://api.github.com/repos/kodeine/laravel-acl/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/kodeine/laravel-acl/issues/5/comments","events_url":"https://api.github.com/repos/kodeine/laravel-acl/issues/5/events","html_url":"https://github.com/kodeine/laravel-acl/issues/5","id":58977753,"number":5,"title":"How to assign multiple roles","user":{"login":"mybigman","id":1289916,"avatar_url":"https://avatars.githubusercontent.com/u/1289916?v=3","gravatar_id":"","url":"https://api.github.com/users/mybigman","html_url":"https://github.com/mybigman","followers_url":"https://api.github.com/users/mybigman/followers","following_url":"https://api.github.com/users/mybigman/following{/other_user}","gists_url":"https://api.github.com/users/mybigman/gists{/gist_id}","starred_url":"https://api.github.com/users/mybigman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mybigman/subscriptions","organizations_url":"https://api.github.com/users/mybigman/orgs","repos_url":"https://api.github.com/users/mybigman/repos","events_url":"https://api.github.com/users/mybigman/events{/privacy}","received_events_url":"https://api.github.com/users/mybigman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-25T22:05:20Z","updated_at":"2015-02-26T00:30:40Z","closed_at":null,"body":"Hi,\r\n\r\nCan I do this...\r\n\r\n```\r\n'is' => 'admin|mod'\r\n```\r\n\r\nSo if the user is an 'admin' OR 'moderator' they can access...\r\n\r\nand also...\r\n\r\n```\r\n'is' => 'mod.editor'\r\n```\r\n\r\nSo if the user is a 'moderator' AND 'editor' they can access...\r\n"},"comment":{"url":"https://api.github.com/repos/kodeine/laravel-acl/issues/comments/76096856","html_url":"https://github.com/kodeine/laravel-acl/issues/5#issuecomment-76096856","issue_url":"https://api.github.com/repos/kodeine/laravel-acl/issues/5","id":76096856,"user":{"login":"kodeine","id":8620059,"avatar_url":"https://avatars.githubusercontent.com/u/8620059?v=3","gravatar_id":"","url":"https://api.github.com/users/kodeine","html_url":"https://github.com/kodeine","followers_url":"https://api.github.com/users/kodeine/followers","following_url":"https://api.github.com/users/kodeine/following{/other_user}","gists_url":"https://api.github.com/users/kodeine/gists{/gist_id}","starred_url":"https://api.github.com/users/kodeine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kodeine/subscriptions","organizations_url":"https://api.github.com/users/kodeine/orgs","repos_url":"https://api.github.com/users/kodeine/repos","events_url":"https://api.github.com/users/kodeine/events{/privacy}","received_events_url":"https://api.github.com/users/kodeine/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T00:30:40Z","updated_at":"2015-02-26T00:30:40Z","body":"@mybigman, yes you can do `'is' => 'admin|mod'` where `admin` and `mod` are Roles.\r\nfor permissions, you need to use `'can' => 'editor.mod'` where `editor` is a permission and `mod` is an alias. basically we bind multiple permissions to an alias. \r\n\r\nto create new permission `editor.mod`, you would have to do \r\n```php\r\n$permission = new Permission();\r\n$editor = $permission->create([ \r\n    'name'        => 'mod', // alias\r\n    'slug'        => [          // pass an array of permissions.\r\n        'editor'     => true\r\n    ]\r\n]);\r\n\r\n//or slug without array.\r\n\r\n$editor = $permission->create([ \r\n    'name'        => 'mod', // alias\r\n    'slug'        => 'editor' // it will be considered as editor => true.\r\n]);\r\n```\r\n\r\nLets assign the newly created permission to `mod` role.\r\n\r\n```php\r\n$roleMod = Role::first();\r\n$roleMod->assignPermission($editor);\r\n```\r\n\r\nNow you can validate permissions\r\n\r\n```php\r\n$user->canEditorMod();\r\n//or\r\n$user->can('editor.mod'); \r\n```"}}