title: Trying to get property of non-object laravel 5.4
body: <p>We have a project upgraded from laravel v 5.1  to v 5.4
  and many issues and bugs appear after upgrade anyway have this one </p>
  
  <pre><code>Trying to get property of non-object for index.blade.php
  </code></pre>
  
  <p>and this is the code </p>
  
  <pre><code>&lt;tbody&gt;
   @foreach($routeFEmails as $routeFEmail)
  
   &lt;tr&gt;
   &lt;td&gt;{{ $routeFEmail-&gt;id }}&lt;/td&gt;
   &lt;td&gt;{{ $routeFEmail-&gt;routeF-&gt;id }} ({{ $routeFEmail-&gt;routeF-&gt;vessel_name }})&lt;/td&gt;
   &lt;td&gt;{{ $routeFEmail-&gt;creator-&gt;type }}:&amp;nbsp;{{ $routeFEmail-&gt;creator-&gt;first_name }} {{ $routeFEmail-&gt;creator-&gt;last_name }}&lt;/td&gt;
   &lt;td&gt;{{ $routeFEmail-&gt;status }}&lt;/td&gt;
   &lt;td&gt;{{ $routeFEmail-&gt;created_at-&gt;format('Y-m-d H:i') }}&lt;/td&gt;
    &lt;/tr&gt;
    @endforeach
   &lt;/tbody&gt;
  </code></pre>
  
  <p>i check model and no value from what mention is null no NULL </p>
  
  <p>i did also </p>
  
  <pre><code>php artisan cache:clear 
  php artisan route:clear 
  php artisan view:clear 
  </code></pre>
  
  <p>and this is a function in co controller </p>
  
  <pre><code>public function index()
  {
      $routeFEmails = RouteFEmail::orderBy('id', 'desc')-&gt;paginate(10);
      return view('backend.route_f_emails.index', compact('routeFEmails'));
  }
  </code></pre>
  
  <p>HOW I CAN FIX THIS ? :(</p>