{"action":"created","issue":{"url":"https://api.github.com/repos/Zizaco/entrust/issues/335","labels_url":"https://api.github.com/repos/Zizaco/entrust/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/Zizaco/entrust/issues/335/comments","events_url":"https://api.github.com/repos/Zizaco/entrust/issues/335/events","html_url":"https://github.com/Zizaco/entrust/issues/335","id":93000010,"number":335,"title":"Check Entrust::hasRole or Entrust::can in Controller","user":{"login":"cstpraveen","id":5960611,"avatar_url":"https://avatars.githubusercontent.com/u/5960611?v=3","gravatar_id":"","url":"https://api.github.com/users/cstpraveen","html_url":"https://github.com/cstpraveen","followers_url":"https://api.github.com/users/cstpraveen/followers","following_url":"https://api.github.com/users/cstpraveen/following{/other_user}","gists_url":"https://api.github.com/users/cstpraveen/gists{/gist_id}","starred_url":"https://api.github.com/users/cstpraveen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstpraveen/subscriptions","organizations_url":"https://api.github.com/users/cstpraveen/orgs","repos_url":"https://api.github.com/users/cstpraveen/repos","events_url":"https://api.github.com/users/cstpraveen/events{/privacy}","received_events_url":"https://api.github.com/users/cstpraveen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-04T10:33:34Z","updated_at":"2015-07-05T19:51:13Z","closed_at":null,"body":"I have tried to use this command in Laravel\r\n\r\nEntrust::can('customers-views')\r\n\r\nit shows me error like this\r\n\r\nClass 'App\\Http\\Controllers\\Entrust' not found"},"comment":{"url":"https://api.github.com/repos/Zizaco/entrust/issues/comments/118661464","html_url":"https://github.com/Zizaco/entrust/issues/335#issuecomment-118661464","issue_url":"https://api.github.com/repos/Zizaco/entrust/issues/335","id":118661464,"user":{"login":"Prophet731","id":2193906,"avatar_url":"https://avatars.githubusercontent.com/u/2193906?v=3","gravatar_id":"","url":"https://api.github.com/users/Prophet731","html_url":"https://github.com/Prophet731","followers_url":"https://api.github.com/users/Prophet731/followers","following_url":"https://api.github.com/users/Prophet731/following{/other_user}","gists_url":"https://api.github.com/users/Prophet731/gists{/gist_id}","starred_url":"https://api.github.com/users/Prophet731/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prophet731/subscriptions","organizations_url":"https://api.github.com/users/Prophet731/orgs","repos_url":"https://api.github.com/users/Prophet731/repos","events_url":"https://api.github.com/users/Prophet731/events{/privacy}","received_events_url":"https://api.github.com/users/Prophet731/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T19:51:13Z","updated_at":"2015-07-05T19:51:13Z","body":"You need to add the use case at the top of your controller like so.\r\n\r\n```PHP\r\n<?php namespace App\\Http\\Controllers;\r\n\r\nuse Zizaco\\Entrust\\EntrustFacade as Entrust;\r\n\r\nclass SomeController extends BaseController { ... }\r\n```"}}