title: Auth::user Trying to get property of non-object
body: <p>I'm using laravel 5.3 and using Multi-Auth Hesto Package. 
  I used view composers to pass my current Auth::user to Welcome.blade</p>
  
  <p>I already logged in my Customer/Home.blade but when I go to Welcome.blade and accessing the current Auth::useran error says "Trying to get property of non-object"</p>
  
  <p>Here's my Viewmcomposers/AuthComposer.php</p>
  
  <pre><code>class AuthComposer
  {
      public $currentUser;
  
   public function __construct()
      {
          $this-&gt;currentUser = Auth::User();
          View::share([ 'currentUser' =&gt; $this-&gt;currentUser ]);
      }
  
     public function compose(View $view)
      {
          $view-&gt;with('currentUser', Auth::user()-&gt;name);
      }
  }
  </code></pre>
  
  <p>App/Providers/ComposerServiceProvider.php</p>
  
  <pre><code> public function boot()
      {
  
      view()-&gt;composer('welcome', function ($view) 
      {
          $currentUser = Customer::where('name', Auth::user()-&gt;name);
          $view-&gt;with('welcome', $currentUser );    
      }); 
      }
  </code></pre>
  
  <p>Config/App.php</p>
  
  <pre><code> App\Providers\ComposerServiceProvider::class,
  </code></pre>
  
  <p>My routes for customer</p>
  
  <pre><code>Route::get('/home', function () {
      $users[] = Auth::user();
      $users[] = Auth::guard()-&gt;user();
      $users[] = Auth::guard('customer')-&gt;user();
      return view('customer.home');
  })-&gt;name('home');
  </code></pre>
  
  <p>And I just call this in my routes/web.php for my welcome.blade</p>
  
  <pre><code>Route::get('/', 'WelcomeController@showWelcome');
  </code></pre>