title: how to get data from single row by user id laravel 5.4
body: <p>I am new in laravel, i want to get single record of user by <strong>user id</strong> and display in Input value. please guide me</p>
  
  <h2>Controller</h2>
  
  <pre><code>public function profile(){
  
      $userdata = User::all();
  
      return view('pages/edit-profile')-&gt;with('userdata',$userdata);
  }
  </code></pre>
  
  <h2>Route</h2>
  
  <pre><code>Route::get('profile', 'PageController@profile_c');
  </code></pre>
  
  <h2>Form View</h2>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  &lt;form class="form-horizontal" role="form" action="/edit_profile" method="post"&gt;
                      {{  csrf_field() }}
   &lt;div class="form-group"&gt;
      &lt;label class="col-lg-3 control-label"&gt;First name:&lt;/label&gt;
        &lt;div class="col-lg-8"&gt;
          &lt;input class="form-control" name="firstName" id="firstName" type="text" value="Jane"&gt;
        &lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="form-group"&gt;
     &lt;label class="col-lg-3 control-label"&gt;Last name:&lt;/label&gt;
       &lt;div class="col-lg-8"&gt;
         &lt;input class="form-control" name="lastName" id="lastName" type="text" value="Bishop"&gt;
       &lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="form-group"&gt;
    &lt;label class="col-lg-3 control-label"&gt;Display name:&lt;/label&gt;
      &lt;div class="col-lg-8"&gt;
         &lt;input class="form-control" name="displayName" id="displayName" type="text" value="Jane Bishop"&gt;
      &lt;/div&gt;
   &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;label class="col-lg-3 control-label"&gt;Email:&lt;/label&gt;
       &lt;div class="col-lg-8"&gt;
        &lt;input class="form-control" name="email" id="email" disabled type="email" value="janesemail@gmail.com"&gt;
       &lt;/div&gt;
    &lt;/div&gt;
   &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>