title: how to display My table data in Laravel 5.2
body: <p>I have collaborators table in My Laravel app see this following
  <a href="https://i.stack.imgur.com/wW6hn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wW6hn.png" alt="enter image description here"></a></p>
  
  <p>I need collaborator_id print in My index.blade.php file who equel with Auth::user()->id to logged with the system. I wrote following code in My Collaboration Model</p>
  
  <pre><code>public function scopeColabo($query){
   return $query-&gt;where('collaborator_id',Auth::user()-&gt;id);}
  </code></pre>
  
  <p>and this is My ProjectCollaboratorController function</p>
  
  <pre><code>public function index(){
  $collaborators = Collaboration::colabo()-&gt;getreturn view('collaborators.index')-&gt;withCollaboration($collaborators);}
  </code></pre>
  
  <p>and this is My index.blade.php</p>
  
  <pre><code>&lt;div class="container"&gt;
  @if($collaboration)
  &lt;div class="row"&gt;
           @foreach ($collaboration as $proj)
             &lt;div class="col-md-3" style="border:1px solid #ccc;margin-left:5px;"&gt;
             &lt;h2&gt;&lt;a href="/projects/{{ $proj-&gt;id }}"&gt;{!! $proj-&gt;project_id !!}&lt;/a&gt;&lt;/h2&gt;
  
             &lt;p&gt;Tasks: 0&lt;/p&gt;
             &lt;p&gt;Comments: 0&lt;/p&gt;
             &lt;p&gt;Attachments: 0&lt;/p&gt;
             &lt;/div&gt;
  
          @endforeach
       &lt;/div&gt;
    @endif
  
  
  
     @if($collaboration-&gt;isEmpty())
       &lt;h3&gt;There are currently no Collaboration&lt;/h3&gt;
  @endif 
  &lt;/div&gt;
  </code></pre>
  
  <p>But when I click collaboration link index.blade.php file generate</p>
  
  <pre><code>There are currently no Projects
  </code></pre>
  
  <p>but in My table there is data....how can print collaborator_id in collaboration Table relete with current logged user?</p>