Laravel Jetsream个人资料页面未加载新的安装

发布于 2025-01-28 11:14:03 字数 333 浏览 2 评论 0原文

我已经完成了Laravel Jetstream的全新安装。

在完成Jetstream(惯性)设置过程中概述的所有步骤后,使用“ PHP Artisan Serve”命令启动了项目。我可以导航到正确显示的仪表板页面。

但是,当我单击屏幕上右上方的新创建的用户时,然后选择“配置文件”时,个人资料页面不会呈现。

在我的控制台视图中,我会看到以下错误:

未被发现(在承诺中)错误:Ziggy错误:路由'verification.send'不在路由列表中。

我没有对路线进行任何更改,因为安装新项目。

有人知道是什么原因导致了这一点,请问如何解决?

I have performed a fresh install of Laravel Jetstream.

Upon completing all the steps outlined in the Jetstream (Inertia) set up process, the project starts up fine using the 'php artisan serve' command. I can navigate to the Dashboard page which displays properly.

However, when I click on the newly created user in the top-right of the screen then select 'Profile', the profile page does not render.

Within my console view I see the following error:

Uncaught (in promise) Error: Ziggy error: route 'verification.send' is not in the route list.

I have not made any changes to the routes since installing the new project.

Does anyone have any idea what is causing this and how to fix it please?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请叫√我孤独 2025-02-04 11:14:03

这似乎是一个喷气式错误。如果您不想启用电子邮件验证。

转到File updateProfileInformationform.php在Resources/js/pages/profile/partials中,

您会找到

<div v-show="user.email_verified_at === null">

必须添加

v-if="$page.props.jetstream.hasEmailVerification"

该 行的行已启用。

那么整个div应该看起来像这样

<div v-if="$page.props.jetstream.hasEmailVerification" v-show="user.email_verified_at === null">
  <p class="text-sm mt-2">
    Your email address is unverified.

    <Link
      :href="route('verification.send')"
      method="post"
      as="button"
      class="underline text-gray-600 hover:text-gray-900"
      @click.prevent="sendEmailVerification"
    >
      Click here to re-send the verification email.
    </Link>
  </p>

  <div v-show="verificationLinkSent" class="mt-2 font-medium text-sm text-green-600">
    A new verification link has been sent to your email address.
  </div>
</div>

It seems like a Jetstream bug. If you don't wanna enable Email Verification.

Go to the file UpdateProfileInformationForm.php in resources/js/Pages/Profile/Partials

You'll find this line

<div v-show="user.email_verified_at === null">

You have to add

v-if="$page.props.jetstream.hasEmailVerification"

inside that div to check if the email verification is enabled.

Then that whole div should looks like this

<div v-if="$page.props.jetstream.hasEmailVerification" v-show="user.email_verified_at === null">
  <p class="text-sm mt-2">
    Your email address is unverified.

    <Link
      :href="route('verification.send')"
      method="post"
      as="button"
      class="underline text-gray-600 hover:text-gray-900"
      @click.prevent="sendEmailVerification"
    >
      Click here to re-send the verification email.
    </Link>
  </p>

  <div v-show="verificationLinkSent" class="mt-2 font-medium text-sm text-green-600">
    A new verification link has been sent to your email address.
  </div>
</div>
以往的大感动 2025-02-04 11:14:03

发生错误是因为重新发送电子邮件验证的链接已在配置文件视图中添加。 来解决错误

Features::emailVerification()

您可以通过在config/forty.php中启用或简单地删除“单击此处重新介绍验证电子邮件” 。个人资料页面上的链接。

The error occurs because a link to resend the email verification has been added in the profile view. You can fix the error by enabling

Features::emailVerification()

in config/forty.php or simply removing the "Click here to re-send the verification email." link on the profile page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文