enhance dikit
This commit is contained in:
@@ -137,6 +137,8 @@ class FormUpCountryController extends Controller
|
||||
]);
|
||||
|
||||
session()->flash('success', 'Form has been created.');
|
||||
session()->flash('redirect_url', route('forms.up-country'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
title: "Success!",
|
||||
text: "{{ Session::get('success') }}",
|
||||
icon: "success"
|
||||
}).then(() => {
|
||||
if ("{{ Session::get('redirect_url') }}") {
|
||||
window.location.href = "{{ Session::get('redirect_url') }}";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
@@ -30,6 +34,10 @@
|
||||
text: "{{ Session::get('error') }}",
|
||||
icon: "error",
|
||||
timer: 5000
|
||||
}).then(() => {
|
||||
if ("{{ Session::get('redirect_url') }}") {
|
||||
window.location.href = "{{ Session::get('redirect_url') }}";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user