{"action":"created","issue":{"url":"https://api.github.com/repos/santigarcor/laratrust/issues/255","repository_url":"https://api.github.com/repos/santigarcor/laratrust","labels_url":"https://api.github.com/repos/santigarcor/laratrust/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/santigarcor/laratrust/issues/255/comments","events_url":"https://api.github.com/repos/santigarcor/laratrust/issues/255/events","html_url":"https://github.com/santigarcor/laratrust/issues/255","id":300603394,"number":255,"title":"Can't use ->hasrole() (BadMethodCallException)","user":{"login":"ufeg02","id":1321921,"avatar_url":"https://avatars0.githubusercontent.com/u/1321921?v=4","gravatar_id":"","url":"https://api.github.com/users/ufeg02","html_url":"https://github.com/ufeg02","followers_url":"https://api.github.com/users/ufeg02/followers","following_url":"https://api.github.com/users/ufeg02/following{/other_user}","gists_url":"https://api.github.com/users/ufeg02/gists{/gist_id}","starred_url":"https://api.github.com/users/ufeg02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufeg02/subscriptions","organizations_url":"https://api.github.com/users/ufeg02/orgs","repos_url":"https://api.github.com/users/ufeg02/repos","events_url":"https://api.github.com/users/ufeg02/events{/privacy}","received_events_url":"https://api.github.com/users/ufeg02/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-27T12:02:59Z","updated_at":"2018-02-27T18:01:42Z","closed_at":null,"author_association":"NONE","body":"I get an error when I try to use $user->hasrole('role').\r\n\r\nBadMethodCallException\r\nMethod hasRole does not exist.\r\n\r\n\r\nIf I do dd .... this is the result:\r\n\r\n```php\r\narray:4 [▼\r\n  \"Laratrust\\Traits\\LaratrustUserTrait\" => \"Laratrust\\Traits\\LaratrustUserTrait\"\r\n  \"Illuminate\\Notifications\\Notifiable\" => \"Illuminate\\Notifications\\Notifiable\"\r\n  \"Laravel\\Passport\\HasApiTokens\" => \"Laravel\\Passport\\HasApiTokens\"\r\n  \"Lexx\\ChatMessenger\\Traits\\Messagable\" => \"Lexx\\ChatMessenger\\Traits\\Messagable\"\r\n]\r\narray:153 [▼\r\n  0 => \"capture\"\r\n  1 => \"instance\"\r\n  2 => \"method\"\r\n  3 => \"root\"\r\n  4 => \"url\"\r\n  5 => \"fullUrl\"\r\n  6 => \"fullUrlWithQuery\"\r\n  7 => \"path\"\r\n  8 => \"decodedPath\"\r\n  9 => \"segment\"\r\n  10 => \"segments\"\r\n  11 => \"is\"\r\n  12 => \"routeIs\"\r\n  13 => \"fullUrlIs\"\r\n  14 => \"ajax\"\r\n  15 => \"pjax\"\r\n  16 => \"secure\"\r\n  17 => \"ip\"\r\n  18 => \"ips\"\r\n  19 => \"userAgent\"\r\n  20 => \"merge\"\r\n  21 => \"replace\"\r\n  22 => \"json\"\r\n  23 => \"createFromBase\"\r\n  24 => \"duplicate\"\r\n  25 => \"session\"\r\n  26 => \"setLaravelSession\"\r\n  27 => \"user\"\r\n  28 => \"route\"\r\n  29 => \"fingerprint\"\r\n  30 => \"setJson\"\r\n  31 => \"getUserResolver\"\r\n  32 => \"setUserResolver\"\r\n  33 => \"getRouteResolver\"\r\n  34 => \"setRouteResolver\"\r\n  35 => \"toArray\"\r\n  36 => \"offsetExists\"\r\n  37 => \"offsetGet\"\r\n  38 => \"offsetSet\"\r\n  39 => \"offsetUnset\"\r\n  40 => \"__isset\"\r\n  41 => \"__get\"\r\n  42 => \"__construct\"\r\n  43 => \"initialize\"\r\n  44 => \"createFromGlobals\"\r\n  45 => \"create\"\r\n  46 => \"setFactory\"\r\n  47 => \"__clone\"\r\n  48 => \"__toString\"\r\n  49 => \"overrideGlobals\"\r\n  50 => \"setTrustedProxies\"\r\n  51 => \"getTrustedProxies\"\r\n  52 => \"getTrustedHeaderSet\"\r\n  53 => \"setTrustedHosts\"\r\n  54 => \"getTrustedHosts\"\r\n  55 => \"setTrustedHeaderName\"\r\n  56 => \"getTrustedHeaderName\"\r\n  57 => \"normalizeQueryString\"\r\n  58 => \"enableHttpMethodParameterOverride\"\r\n  59 => \"getHttpMethodParameterOverride\"\r\n  60 => \"get\"\r\n  61 => \"getSession\"\r\n  62 => \"hasPreviousSession\"\r\n  63 => \"hasSession\"\r\n  64 => \"setSession\"\r\n  65 => \"getClientIps\"\r\n  66 => \"getClientIp\"\r\n  67 => \"getScriptName\"\r\n  68 => \"getPathInfo\"\r\n  69 => \"getBasePath\"\r\n  70 => \"getBaseUrl\"\r\n  71 => \"getScheme\"\r\n  72 => \"getPort\"\r\n  73 => \"getUser\"\r\n  74 => \"getPassword\"\r\n  75 => \"getUserInfo\"\r\n  76 => \"getHttpHost\"\r\n  77 => \"getRequestUri\"\r\n  78 => \"getSchemeAndHttpHost\"\r\n  79 => \"getUri\"\r\n  80 => \"getUriForPath\"\r\n  81 => \"getRelativeUriForPath\"\r\n  82 => \"getQueryString\"\r\n  83 => \"isSecure\"\r\n  84 => \"getHost\"\r\n  85 => \"setMethod\"\r\n  86 => \"getMethod\"\r\n  87 => \"getRealMethod\"\r\n  88 => \"getMimeType\"\r\n  89 => \"getMimeTypes\"\r\n  90 => \"getFormat\"\r\n  91 => \"setFormat\"\r\n  92 => \"getRequestFormat\"\r\n  93 => \"setRequestFormat\"\r\n  94 => \"getContentType\"\r\n  95 => \"setDefaultLocale\"\r\n  96 => \"getDefaultLocale\"\r\n  97 => \"setLocale\"\r\n  98 => \"getLocale\"\r\n  99 => \"isMethod\"\r\n  100 => \"isMethodSafe\"\r\n  101 => \"isMethodIdempotent\"\r\n  102 => \"isMethodCacheable\"\r\n  103 => \"getProtocolVersion\"\r\n  104 => \"getContent\"\r\n  105 => \"getETags\"\r\n  106 => \"isNoCache\"\r\n  107 => \"getPreferredLanguage\"\r\n  108 => \"getLanguages\"\r\n  109 => \"getCharsets\"\r\n  110 => \"getEncodings\"\r\n  111 => \"getAcceptableContentTypes\"\r\n  112 => \"isXmlHttpRequest\"\r\n  113 => \"isFromTrustedProxy\"\r\n  114 => \"matchesType\"\r\n  115 => \"isJson\"\r\n  116 => \"expectsJson\"\r\n  117 => \"wantsJson\"\r\n  118 => \"accepts\"\r\n  119 => \"prefers\"\r\n  120 => \"acceptsJson\"\r\n  121 => \"acceptsHtml\"\r\n  122 => \"format\"\r\n  123 => \"old\"\r\n  124 => \"flash\"\r\n  125 => \"flashOnly\"\r\n  126 => \"flashExcept\"\r\n  127 => \"flush\"\r\n  128 => \"server\"\r\n  129 => \"hasHeader\"\r\n  130 => \"header\"\r\n  131 => \"bearerToken\"\r\n  132 => \"exists\"\r\n  133 => \"has\"\r\n  134 => \"hasAny\"\r\n  135 => \"filled\"\r\n  136 => \"keys\"\r\n  137 => \"all\"\r\n  138 => \"input\"\r\n  139 => \"only\"\r\n  140 => \"except\"\r\n  141 => \"query\"\r\n  142 => \"post\"\r\n  143 => \"hasCookie\"\r\n  144 => \"cookie\"\r\n  145 => \"allFiles\"\r\n  146 => \"hasFile\"\r\n  147 => \"file\"\r\n  148 => \"macro\"\r\n  149 => \"mixin\"\r\n  150 => \"hasMacro\"\r\n  151 => \"__callStatic\"\r\n  152 => \"__call\"\r\n]\r\n```"},"comment":{"url":"https://api.github.com/repos/santigarcor/laratrust/issues/comments/368969666","html_url":"https://github.com/santigarcor/laratrust/issues/255#issuecomment-368969666","issue_url":"https://api.github.com/repos/santigarcor/laratrust/issues/255","id":368969666,"user":{"login":"ufeg02","id":1321921,"avatar_url":"https://avatars0.githubusercontent.com/u/1321921?v=4","gravatar_id":"","url":"https://api.github.com/users/ufeg02","html_url":"https://github.com/ufeg02","followers_url":"https://api.github.com/users/ufeg02/followers","following_url":"https://api.github.com/users/ufeg02/following{/other_user}","gists_url":"https://api.github.com/users/ufeg02/gists{/gist_id}","starred_url":"https://api.github.com/users/ufeg02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufeg02/subscriptions","organizations_url":"https://api.github.com/users/ufeg02/orgs","repos_url":"https://api.github.com/users/ufeg02/repos","events_url":"https://api.github.com/users/ufeg02/events{/privacy}","received_events_url":"https://api.github.com/users/ufeg02/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T18:01:42Z","updated_at":"2018-02-27T18:01:42Z","author_association":"NONE","body":"hasRole"}}
{"actor":{"display_login":"ufeg02"}}