mardi 2 juillet 2019

how to show error of a particular function - Laravel

I have logged-in and registration modal in my home page. I am using default login and registration system of Laravel. I have to show error in modal if validation fails. To do this I used below code to force the modal to remain open and show error. But the following code open both loggedin and register modal on error. I want to open only one modal and show error in that modal. For example if user is registering then On error only register modal open and show error but here in this case both modals became open.

Any help would be highly appreciable.

@if (count($errors) > 0)
      <script>
          $( document ).ready(function() {
              $('#signin_popup').modal('show');
          });
      </script>
@endif

  @if (count($errors) > 0)
          <script>
              $( document ).ready(function() {
                  $('#register_popup').modal('show');
              });
          </script>
    @endif



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Xnz1oA
via IFTTT

Aucun commentaire:

Enregistrer un commentaire