jeudi 27 avril 2023

i have return redirect page but page not reload

i have return redirect page send use with function but not reload page and not show message

my blade file button click:

onclick="edit_offer(,'')"

controller :

return redirect('offer/delete')->with('message','This Service Is Unavailable');

javascript: $.ajax({ method: "GET", url: base_url + '/' + url + '/delete/' + id, success: function (result) { if (result.success == true) { setTimeout(() => { }, 1000); Swal.fire({ type: 'success', title: 'Deleted!', text: 'Record has deleted successfully.', showConfirmButton: false, }) } else if (result.success == false) { alert(result.data); }

            },
            error: function (err) {
                Swal.fire({
                    type: 'error',
                    title: 'Oops...',
                    text: 'This record is connect with another data!'

                })

            }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire