title: Make Modal Edit Pop up Laravel
body: <p>i want to make modal popup for my edit form. i already make the popup but it wont to get the <code>id</code>.</p>
  
  <p>here my veiw :</p>
  
  
  
  
  
  <pre><code>&lt;a title='Edit Data' href="#" data-toggle="modal" class='btn btn-xs btn-warning' data-target="#moModal"&gt;&lt;i class='fa fa-pencil'&gt;&lt;/i&gt;&lt;/a&gt;
  </code></pre>
  
  
  
  <p>and my modal:</p>
  
  
  
  
  
  <pre><code>&lt;div class="modal fade" id="moModal" role="dialog"&gt;
                      &lt;div class="modal-dialog"&gt;
                          &lt;div class="modal-content"&gt;
                          &lt;div class="modal-header"&gt;
                          &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                          &lt;center&gt;&lt;h4&gt;Edit&lt;/h4&gt;&lt;/center&gt;
                          &lt;/div&gt;
                          &lt;div class="modal-body"&gt;
                              &lt;form method='post' action='{{action("FacilitiesController@postEditSave")."/$row-&gt;id"}}' enctype="multipart/form-data"&gt;
                                  &lt;input type="hidden" name="_token" value="{{ csrf_token() }}"&gt;
                                  &lt;div class="box-body"&gt;
                                      &lt;div class="box-body"&gt;
                                      &lt;div class='form-group col-sm-6'&gt;
                                          &lt;label&gt;Facilities&lt;/label&gt;
                                          &lt;input type='text' class='form-control' name='name_facility' value='{{ $row-&gt;name_facility }}' required/&gt;
                                      &lt;/div&gt;
                                      &lt;div class='form-group col-sm-12'&gt;
                                          &lt;button type='submit' class='btn btn-primary'&gt;&lt;i class='fa fa-save'&gt;&lt;/i&gt; Simpan&lt;/button&gt;
                                      &lt;/div&gt;
                              &lt;/div&gt;&lt;!-- /.box --&gt;
                              &lt;/form&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;/div&gt;
  </code></pre>
  
  
  
  <p>here my controller :</p>
  
  
  
  
  
  <pre><code>public function getIndex()
      {
          $posts = DB::table('facilities')
          -&gt;orderBy('id', 'asc');
          $posts = $posts-&gt;paginate(10);
          return view('facilities', ['posts' =&gt; $posts]);
      }
  public function getEdit($id)  {
          $data['row'] = facilities::find($id);
          return view('facilities_form',$data);
      }
  public function postEditSave($id) {
          $simpan= array();
          $simpan['name_facility']=Request::input('name_facility');
  
          DB::table('facilities')-&gt;where('id', $id)-&gt;update($simpan);
          Session::flash('edit', 'Data successfully edited');
          return Redirect::to('facilities');
      }
  </code></pre>
  
  
  
  <p>so, have someone help me what improvements do i have to make to the code to achieve my goal?</p>