{"action":"created","issue":{"url":"https://api.github.com/repos/Zizaco/entrust/issues/247","labels_url":"https://api.github.com/repos/Zizaco/entrust/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/Zizaco/entrust/issues/247/comments","events_url":"https://api.github.com/repos/Zizaco/entrust/issues/247/events","html_url":"https://github.com/Zizaco/entrust/issues/247","id":57900930,"number":247,"title":"Class '\\Role' not found in laravel 5","user":{"login":"tidusvn05","id":2610894,"avatar_url":"https://avatars.githubusercontent.com/u/2610894?v=3","gravatar_id":"","url":"https://api.github.com/users/tidusvn05","html_url":"https://github.com/tidusvn05","followers_url":"https://api.github.com/users/tidusvn05/followers","following_url":"https://api.github.com/users/tidusvn05/following{/other_user}","gists_url":"https://api.github.com/users/tidusvn05/gists{/gist_id}","starred_url":"https://api.github.com/users/tidusvn05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tidusvn05/subscriptions","organizations_url":"https://api.github.com/users/tidusvn05/orgs","repos_url":"https://api.github.com/users/tidusvn05/repos","events_url":"https://api.github.com/users/tidusvn05/events{/privacy}","received_events_url":"https://api.github.com/users/tidusvn05/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-17T09:24:52Z","updated_at":"2015-02-17T16:51:41Z","closed_at":null,"body":"i have a problem as following:\r\n\r\n* composer.json\r\n\"zizaco/entrust\": \"dev-laravel-5\",\r\n\r\n* i was run migration & can create roles, permission\r\n\r\n* in model User, i made as guide from author:\r\n<?php\r\n\r\nuse Zizaco\\Entrust\\Traits\\EntrustUserTrait;\r\n\r\nclass User extends Eloquent\r\n{\r\n    use EntrustUserTrait; // add this trait to your user model\r\n\r\n    ...\r\n}\r\n\r\nthen i attach role for an user:\r\n$user->attachRole($admin); // parameter can be an Role object, array, or id\r\nor $user->hasRole('admin');\r\n\r\n=> i got an exception:\r\n\r\nPHP Fatal error:  Class '\\Role' not found in /Volumes/Data/IdooSources/ISAdminTools/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 971\r\nPHP Stack trace:\r\nPHP   1. {main}() /Volumes/Data/IdooSources/ISAdminTools/artisan:0\r\nPHP   2. Illuminate\\Foundation\\Console\\Kernel->handle() /Volumes/Data/IdooSources/ISAdminTools/artisan:36\r\nPHP   3. Symfony\\Component\\Console\\Application->run() /Volumes/Data/IdooSources/ISAdminTools/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:91\r\nPHP   4. Symfony\\Component\\Console\\Application->doRun() /Volumes/Data/IdooSources/ISAdminTools/vendor/symfony/console/Symfony/Component/Console/Application.php:126\r\nPHP   5. Symfony\\Component\\Console\\Application->doRunCommand() /Volumes/Data/IdooSources/ISAdminTools/vendor/symfony/console/Symfony/Component/Console/Application.php:195\r\n\r\n\r\n\r\nanyone can help me.\r\n\r\nthank in advance!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Zizaco/entrust/issues/comments/74702485","html_url":"https://github.com/Zizaco/entrust/issues/247#issuecomment-74702485","issue_url":"https://api.github.com/repos/Zizaco/entrust/issues/247","id":74702485,"user":{"login":"FDiskas","id":468006,"avatar_url":"https://avatars.githubusercontent.com/u/468006?v=3","gravatar_id":"","url":"https://api.github.com/users/FDiskas","html_url":"https://github.com/FDiskas","followers_url":"https://api.github.com/users/FDiskas/followers","following_url":"https://api.github.com/users/FDiskas/following{/other_user}","gists_url":"https://api.github.com/users/FDiskas/gists{/gist_id}","starred_url":"https://api.github.com/users/FDiskas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FDiskas/subscriptions","organizations_url":"https://api.github.com/users/FDiskas/orgs","repos_url":"https://api.github.com/users/FDiskas/repos","events_url":"https://api.github.com/users/FDiskas/events{/privacy}","received_events_url":"https://api.github.com/users/FDiskas/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T16:51:41Z","updated_at":"2015-02-17T16:51:41Z","body":"Thanks @cjmling \r\nMy Models is in App/Models directory and this Role model is within User directory so I changed the config \r\n```\r\n'role' => 'App\\Models\\User\\Role'\r\n```\r\nand now works - thanks to you"}}