dpiuqwwyu187975836 2018-06-07 11:36
浏览 72
已采纳

如何找到最近创建的用户 - Laravel

I just created a new user in my database. But before the user gets on the homepage, i check if the user was just created to show an animation to the user like below but is not doing the trick.. What could be the issue?

 @if(Auth::user()->waRecentlyCreated)
      {
      <div id="loader-wrapper">
                <div id="loader"></div>
                <div class="loader-section section-left"></div>
          <div class="loader-section section-right"></div>
          </div>
      }
      @endif

    else
    {
          //show the home page right away
    }
  • 写回答

2条回答 默认 最新

  • doubiaozhan0745 2018-06-07 12:35
    关注

    Firstly you are missing s in waRecentlyCreated and You can access it anywhere simply by using \Auth::user()->wasRecentlyCreated and before using always first check Auth by using \Auth::check() in if condition.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 前端echarts坐标轴问题
  • ¥15 CMFCPropertyPage
  • ¥15 ad5933的I2C
  • ¥15 请问RTX4060的笔记本电脑可以训练yolov5模型吗?
  • ¥15 数学建模求思路及代码
  • ¥50 silvaco GaN HEMT有栅极场板的击穿电压仿真问题
  • ¥15 谁会P4语言啊,我想请教一下
  • ¥15 这个怎么改成直流激励源给加热电阻提供5a电流呀
  • ¥50 求解vmware的网络模式问题 别拿AI回答
  • ¥24 EFS加密后,在同一台电脑解密出错,证书界面找不到对应指纹的证书,未备份证书,求在原电脑解密的方法,可行即采纳