title: Display user profile url by name instead of ID
body: <p>I am Newbie. I'm trying to return a view of member profile</p>
  
  <p>At the moment, the user profile is accessible by its <strong>ID</strong>, like so</p>
  
  <blockquote>
    <p>profile/7</p>
  </blockquote>
  
  <p>I would like to access it through the <strong>name</strong> that I've created</p>
  
  <blockquote>
    <p>profile/John</p>
  </blockquote>
  
  <p>this is my route</p>
  
  <pre><code>Route::get('profile/{id}', 'ProfilController@tampilkanID');
  </code></pre>
  
  <p>this is my controller</p>
  
  <pre><code>public function tampilkanID($id)
  {
      $auth = Auth::user()-&gt;id;
      $users=\App\users::all()-&gt;whereNotIn('id',$auth);
      $tampilkan = Users::find($id);
      return view('tampilkan', compact('tampilkan', 'users')); 
  }
  </code></pre>
  
  <p>and this how i call it in my blade</p>
  
  <pre><code> @foreach($users as $user)
             &lt;tr&gt;
                 &lt;td&gt;&lt;a id="teamname" href="{{ url('profile',$user-&gt;id) }}" target="_blank"&gt;{{$user-&gt;name}}&lt;/a&gt;&lt;/td&gt;
                &lt;/tr&gt;
   @endforeach
  </code></pre>
  
  <p>thank you</p>