[英]Use Laravel Auth with custom view
I am trying to implement a one-page application. 我正在尝试实现一页应用程序。 I want it to resemble the design in the attached image, where the right box will host a login/register fragment if the user is not signed in but will update to a profile/logout once authenticated.
我希望它与所附图像中的设计相似,如果用户未登录,则在右侧框将包含登录/注册片段,但一旦通过身份验证,该框将更新为配置文件/注销。
How can I leverage the existing Laravel authentication feature to get this to work? 如何利用现有的Laravel身份验证功能使它正常工作? Something like sending an Ajax request to the AuthController and then return
Auth::user()
in case of login or sending form data to the auth/register
route. 例如将Ajax请求发送到AuthController,然后在登录的情况下返回
Auth::user()
或将表单数据发送到auth/register
路由。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.