{"action":"opened","issue":{"url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/139","repository_url":"https://api.github.com/repos/cmgmyr/laravel-messenger","labels_url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/139/comments","events_url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/139/events","html_url":"https://github.com/cmgmyr/laravel-messenger/issues/139","id":162345925,"number":139,"title":"newThreadsCount()","user":{"login":"elchejek","id":6506274,"avatar_url":"https://avatars.githubusercontent.com/u/6506274?v=3","gravatar_id":"","url":"https://api.github.com/users/elchejek","html_url":"https://github.com/elchejek","followers_url":"https://api.github.com/users/elchejek/followers","following_url":"https://api.github.com/users/elchejek/following{/other_user}","gists_url":"https://api.github.com/users/elchejek/gists{/gist_id}","starred_url":"https://api.github.com/users/elchejek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elchejek/subscriptions","organizations_url":"https://api.github.com/users/elchejek/orgs","repos_url":"https://api.github.com/users/elchejek/repos","events_url":"https://api.github.com/users/elchejek/events{/privacy}","received_events_url":"https://api.github.com/users/elchejek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-26T20:34:48Z","updated_at":"2016-06-26T20:34:48Z","closed_at":null,"body":"Hello,\r\n\r\ni would like to implement newThreadsCount into appserviceprovider, so variable would be shared to all views - navbar, dashboard, etc. Has anyone any suggestions how to do that?\r\n\r\nI have tried with:\r\n\r\n> public function boot()\r\n>     {\r\n> \r\n>         if (Auth::user()){\r\n>         $countMsg = Auth::user()->newThreadsCount();\r\n>         view()->share('countMsg',$countMsg);\r\n>         }\r\n> \r\n>     }\r\n\r\nbut it is not working. I get  Undefined variable: countMsg.\r\n\r\nBR\r\nEd"}}
{"actor":{"display_login":"elchejek"}}