@if(session('success'))
    <script>
  
  Swal.fire({
    title: "Good job!",
    text: '{{session('success')}}',
    icon: "success"
  });
       </script>
    @endif 


    @if(session('error'))
    <script>
      Swal.fire({
    // icon: "error",
    // title: "Oops...",
    text: '{{session('error')}}',
  
  });
       </script>
    @endif 


    @if($errors->any())
    <script>
      document.addEventListener('DOMContentLoaded', function () {
        Swal.fire({
          // icon: "error",
          // title: "Oops...",
          html: '{!! implode('', $errors->all('<div>:message</div>')) !!}'
        });
      });
    </script>
  @endif