Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Enable email verification


How do I enable email verification in user registration using the Laravel starter kit version?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


Hi Alex,

Make sure your App\Models\User model implements the Illuminate\Contracts\Auth\MustVerifyEmail contract. This will automatically send an email verification link to newly registered users.

For more details and examples, you can refer to these web search results:
https://laravel.com/docs/10.x/verification
https://mailtrap.io/blog/laravel-email-verification/

I hope this helps you to enable email verification in your Laravel project. If you have any other questions, feel free to ask me. 😊

Thanks



When I implement MustVerifyEmail in Model User, and I register it gives an error, why does it try to go directly to the dashboard, when it was supposed to go to it to verify email



Another doubt, how do I make the message that Laravel gives appear in the error modal, and not just the generic one
Sorry, looks like there are some errors detected, please try again. ?



Hi Alex,

Thanks for letting us know about the issue you encountered with the email verification process. Sorry for any inconvenience it may have caused. We totally get how important this feature is for the application.

We will investigate this matter further to identify the root cause of the problem. Our development team will work diligently to provide a fix for the issue as soon as possible.

We really appreciate your feedback and patience. If you've got any other questions or anything else we can help with, don't hesitate to reach out.

Thanks again for bringing this to our attention.



Hi, Faizal,

has this issue been fixed ? i'm getting the same error.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(