title: How can i show a modal through a route and a controller in laravel?
body: <p>So, i want to make a login form using modal. i have been searching a solution of this, and i still confusing(because all the solutions in english and i'm not really good in english). and didn't know how the code of solution works. So, maybe someone can help me by fix some line of my code and explain me how it works? please?</p>
  
  <p>This is my file that contain the modal</p>
  
  <pre><code>&lt;!-- Modal Login--&gt;
      &lt;div class="modal fade" id="loginForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
          &lt;div class="modal-dialog" role="document"&gt;
          &lt;!--Content--&gt;
              &lt;div class="modal-content form-elegant"&gt;
                  &lt;!--Header--&gt;
                  &lt;div class="text-center"&gt;
                      &lt;h3 class="modal-title w-100 dark-grey-text font-weight-bold mt-5" id="myModalLabel"&gt;&lt;strong&gt;Login&lt;/strong&gt;&lt;/h3&gt;
                  &lt;/div&gt;
                  &lt;!--Body--&gt;
                  &lt;div class="modal-body mx-4"&gt;
                      &lt;!--Body--&gt;
                      &lt;form class="form" method="POST" action="#"&gt;
                          {{ csrf_field() }}
                          &lt;div class="md-form"&gt;
                              &lt;input type="email" name="email" id="inputEmail" placeholder="Email" required="@" autofocus&gt;
                          &lt;/div&gt;
  
                          &lt;div class="md-form"&gt;
                              &lt;input type="password" name="pass" id="inputPass" placeholder="Password" required&gt;
                          &lt;/div&gt;
  
                          &lt;input type="submit" class="logbtn" value="Login"&gt;
                          &lt;input type="button" data-dismiss="modal" class="cancelbtn" value="Cancel"&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
                  &lt;!--Footer--&gt;
                  &lt;div class="modal-footer mx-5 pt-3 mb-1"&gt;
                      &lt;p class="font-small grey-text d-flex justify-content-end"&gt;
                          Don't have an account? &lt;a href="#" class="blue-text ml-1" data-dismiss="modal" data-toggle="modal" data-target="#registerForm"&gt;Sign Up&lt;/a&gt;
                      &lt;/p&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;!--/.Content--&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;!-- Modal Login--&gt;
  
      &lt;!-- Modal Register--&gt;
      &lt;div class="modal fade" id="registerForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
          &lt;div class="modal-dialog" role="document"&gt;
          &lt;!--Content--&gt;
              &lt;div class="modal-content form-elegant"&gt;
                  &lt;!--Header--&gt;
                  &lt;div class="text-center"&gt;
                      &lt;h3 class="modal-title w-100 dark-grey-text font-weight-bold mt-5" id="myModalLabel"&gt;&lt;strong&gt;Register&lt;/strong&gt;&lt;/h3&gt;
                  &lt;/div&gt;
                  &lt;!--Body--&gt;
                  &lt;div class="modal-body mx-4"&gt;
                      &lt;!--Body--&gt;
                      &lt;form class="form" method="POST" action="#"&gt;
                          {{ csrf_field() }}
                          &lt;div class="md-form"&gt;
                              &lt;input type="text" name="name" id="inputName" placeholder="Name" required autofocus&gt;
                          &lt;/div&gt;
  
                          &lt;div class="md-form"&gt;
                              &lt;input type="email" name="email" id="inputEmail" placeholder="Email" required="@"&gt;
                          &lt;/div&gt;
  
                          &lt;div class="md-form"&gt;
                              &lt;input type="password" name="pass" id="inputPass" placeholder="Password" required&gt;
                          &lt;/div&gt;
  
                          &lt;div class="md-form"&gt;
                              &lt;input type="password" name="pass_conf" id="inputPassConf" placeholder="Password Confirmation" required&gt;
                          &lt;/div&gt;
  
                          &lt;input type="submit" class="logbtn" value="Register"&gt;
                          &lt;input type="button" data-dismiss="modal" class="cancelbtn" value="Cancel"&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
                  &lt;!--Footer--&gt;
                  &lt;div class="modal-footer mx-5 pt-3 mb-1"&gt;
                      &lt;p class="font-small grey-text d-flex justify-content-end"&gt;
                          Already have an account? &lt;a href="#" class="blue-text ml-1" data-dismiss="modal" data-toggle="modal" data-target="#loginForm"&gt;Login&lt;/a&gt;
                      &lt;/p&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;!--/.Content--&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;!-- Modal Register--&gt;
  </code></pre>
  
  <p>This is my controller (i don't know what i have to do)</p>
  
  <pre><code>class AuthController extends Controller
  {
      public function login() {
          //
      }
  
      public function postLogin(Request $request) {
          //
      }
  
      public function postRegister(Request $request) {
          //
      }
  }
  </code></pre>
  
  <p>and this is my route (this route is still wrong)</p>
  
  <pre><code>Route::get('/login' , 'AuthController@login');
  Route::post('/', 'AuthController@postLogin');
  Route::post('/', 'AuthController@postRegister');
  </code></pre>
  
  <p>Thanks for your time!!</p>