Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Laravel hide message popup when login succesfull


Please help me to hide the (success) message popup when login is successful.
If not successful, then of course error message popup is OK.

The problem is.. When login is successful, we see for a second the message and it goes to the dashboard, so the success message is annoying an useless.

Thank you.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


You’re welcome, I’m glad it’s working! happy



You need to modify the general.js file and remove the part of the code responsible for showing the success message. Specifically, you should remove the Swal.fire code:

/resources/_keenthemes/src/js/custom/authentication/sign-in/general.js


axios.post(submitButton.closest("form").getAttribute("action"), new FormData(form)).then(function (response) {
if (response) {
form.reset();

Swal.fire({
text: "You have successfully logged in!",
icon: "success",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn btn-primary"
}
});

const redirectUrl = form.getAttribute("data-kt-redirect-url");

if (redirectUrl) {
location.href = redirectUrl;
}
}
});


Please rebuild the assets after modified it using "npm run dev"

Thanks



Thank you, it's working!



in general.js file you need to just remove
axios.post(submitButton.closest('form').getAttribute('action'), new FormData(form)).then(function (response) {
if (response) {
form.reset();

// Show message popup. For more info check the plugin's official documentation:
Swal.fire({
text: "You have successfully logged in!",
icon: "success",
buttonsStyling: false,
confirmButtonText: "Ok, got it!",
customClass: {
confirmButton: "btn btn-primary"
}
});

const redirectUrl = form.getAttribute('data-kt-redirect-url');

if (redirectUrl) {
location.href = redirectUrl;
}

remove bold code only



Thank you, it's working!


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(