title: Auth::user not working in laravel
body: <p>I'm creating a messaging application. User logs in and then his conversations are displayed to him. </p>
  
  <p>i used <code>Auth::attempt</code> to check the user(after he submits the login form) . After successful login, he is redirected to a route(conversations) which uses respective controller method(HomeController@conversations). </p>
  
  <p>In the method, i need to know the user's id so that i could fetch his conversation list. SO i need to use <code>Auth::user()-&gt;id</code>, wherever needed. </p>
  
  <p>NOw when i'm using <code>Auth::user()-&gt;id</code>, it is showing an error(trying to get property from non-object).</p>
  
  <p>i tried print_r(Auth::user) and the result was blank.</p>
  
  <p>On localhost, everthing is working fine, but i'm facing this issue on the live server. <code>Auth::attempt</code> is working fine, but <code>Auth::check()</code> and <code>Auth::user()</code> are not. </p>