Sweet alert Notifications | Laravel Livewire 3 from Scratch

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 6

  • @nestorgarcia9819
    @nestorgarcia9819 Рік тому

    Thank you for your video, do ou think you could upload a video using sweet alert implementing the function and id in a CRUD

  • @ferryiqbalrhamdani6977
    @ferryiqbalrhamdani6977 11 місяців тому

    thank you so so much for your tutor video, its useful

    • @laraphant
      @laraphant  11 місяців тому

      Glad it was helpful!

  • @longsuabc
    @longsuabc 9 місяців тому +1

    How to pass id for record deletion? Thanks.

  • @longsuabc
    @longsuabc 9 місяців тому

    Can I know how to pass post id via sweetalert to component for record deletion?

    • @andrianaderizma769
      @andrianaderizma769 4 місяці тому

      ...
      function handleClick(id) {
      const swalWithBootstrapButtons = Swal.mixin({
      customClass: {
      confirmButton: "btn btn-success",
      cancelButton: "btn btn-danger"
      },
      buttonsStyling: false
      });
      swalWithBootstrapButtons.fire({
      title: "Are you sure?",
      text: "You won't be able to revert this!",
      icon: "warning",
      showCancelButton: true,
      confirmButtonText: "Yes, delete it!",
      cancelButtonText: "No, cancel!",
      reverseButtons: true
      }).then((result) => {
      if (result.isConfirmed) {
      @this.dispatch('goOn-delete', {
      id: id
      });
      } else if (
      result.dismiss === Swal.DismissReason.cancel
      ) {
      swalWithBootstrapButtons.fire({
      title: "Cancelled",
      text: "Your imaginary file is safe :)",
      icon: "error"
      });
      }
      });
      }