title: Get User Details from Id of user in Laravel
body: <p>I have been using a composer package <strong>laravel-acquaintances</strong> and have connected it up to my profile. I have also managed to befriend users, my issue is once I try to get all friendships it doesn't allow me to show it based off each users, username or even ID.</p>
  <p>I will present the code I presume is important below, please let me know if I have missed anything out.</p>
  <blockquote>
  <p>web.php</p>
  </blockquote>
  <pre><code>Route::get('/followers/{$user-&gt;}', 'AcquaintancesController@index')-&gt;name('acquaintances.index');
  </code></pre>
  <blockquote>
  <p>AcquaintancesController.php</p>
  </blockquote>
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use App\User;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  
  class AcquaintancesController extends Controller
  {
      public function index(User $user)
      {
          $user = Auth::user();
  
          $friends = $user-&gt;getAllFriendships();
  
          return view('acquaintances.index',[
              'friends' =&gt; $friends
          ]);
      }
  
  }
  </code></pre>
  <blockquote>
  <p>acquaintances/index.blade.php</p>
  </blockquote>
  <pre><code>&lt;div class=&quot;tab-pane fade&quot; id=&quot;acquaintances&quot;&gt;
                      &lt;div class=&quot;row pt-5&quot;&gt;
                          &lt;ul&gt;{{$friends}}&lt;/ul&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>
  <blockquote>
  <p>view on site</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/zBfBk.jpg" rel="nofollow noreferrer">site error</a></p>
  <p>I have tried to use a foreach;</p>
  <ul>{{$friends->user->username}}</ul>
  ... however that didn't work
  <p>I also tried a few other options that I assume were not the best. Please I would appreciate the help.</p>