{"action":"created","issue":{"url":"https://api.github.com/repos/spatie/laravel-permission/issues/90","repository_url":"https://api.github.com/repos/spatie/laravel-permission","labels_url":"https://api.github.com/repos/spatie/laravel-permission/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/spatie/laravel-permission/issues/90/comments","events_url":"https://api.github.com/repos/spatie/laravel-permission/issues/90/events","html_url":"https://github.com/spatie/laravel-permission/issues/90","id":163789349,"number":90,"title":"Call to undefined method Illuminate\\Database\\Query\\Builder::assignRole()","user":{"login":"Reydesel","id":2833228,"avatar_url":"https://avatars.githubusercontent.com/u/2833228?v=3","gravatar_id":"","url":"https://api.github.com/users/Reydesel","html_url":"https://github.com/Reydesel","followers_url":"https://api.github.com/users/Reydesel/followers","following_url":"https://api.github.com/users/Reydesel/following{/other_user}","gists_url":"https://api.github.com/users/Reydesel/gists{/gist_id}","starred_url":"https://api.github.com/users/Reydesel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reydesel/subscriptions","organizations_url":"https://api.github.com/users/Reydesel/orgs","repos_url":"https://api.github.com/users/Reydesel/repos","events_url":"https://api.github.com/users/Reydesel/events{/privacy}","received_events_url":"https://api.github.com/users/Reydesel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-05T07:40:52Z","updated_at":"2016-07-06T05:06:31Z","closed_at":"2016-07-05T07:46:35Z","body":"I keep getting this error and i checked many times every link.\r\n\r\n\r\n        namespace App\\Http\\Controllers;\r\n\r\n        use App\\Http\\Requests;\r\n        use App\\User;\r\n        use Illuminate\\Http\\Request;\r\n        use Spatie\\Permission\\Traits\\HasRoles;\r\n\r\n        class HomeController extends Controller\r\n        {\r\n            use HasRoles;\r\n            /**\r\n             * Create a new controller instance.\r\n             *\r\n             * @return void\r\n             */\r\n            public function __construct()\r\n            {\r\n                $this->middleware('auth');\r\n            }\r\n\r\n            /**\r\n             * Show the application dashboard.\r\n             *\r\n             * @return \\Illuminate\\Http\\Response\r\n             */\r\n            public function index()\r\n            {\r\n\r\n                $user =User::first();\r\n                $user->assignRole('writer');\r\n                return view('home');\r\n            }\r\n        }\r\n"},"comment":{"url":"https://api.github.com/repos/spatie/laravel-permission/issues/comments/230672057","html_url":"https://github.com/spatie/laravel-permission/issues/90#issuecomment-230672057","issue_url":"https://api.github.com/repos/spatie/laravel-permission/issues/90","id":230672057,"user":{"login":"Reydesel","id":2833228,"avatar_url":"https://avatars.githubusercontent.com/u/2833228?v=3","gravatar_id":"","url":"https://api.github.com/users/Reydesel","html_url":"https://github.com/Reydesel","followers_url":"https://api.github.com/users/Reydesel/followers","following_url":"https://api.github.com/users/Reydesel/following{/other_user}","gists_url":"https://api.github.com/users/Reydesel/gists{/gist_id}","starred_url":"https://api.github.com/users/Reydesel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reydesel/subscriptions","organizations_url":"https://api.github.com/users/Reydesel/orgs","repos_url":"https://api.github.com/users/Reydesel/repos","events_url":"https://api.github.com/users/Reydesel/events{/privacy}","received_events_url":"https://api.github.com/users/Reydesel/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T05:06:31Z","updated_at":"2016-07-06T05:06:31Z","body":"Ok that worked, sorry i was using it on the controller. Thanks "}}
{"actor":{"display_login":"Reydesel"}}