简体   繁体   English

成功登录后,为什么我的Laravel Voyager管理员重定向回登录页面

[英]Why does my Laravel Voyager admin redirect back to login page after successful login

The website that has been turned over to me was created in Laravel. 已经移交给我的网站是在Laravel中创建的。 Voyager admin is used for updating the contents. Voyager管理员用于更新内容。 I am not yet familiar with Voyager. 我对Voyager尚不熟悉。

I just noticed that upon entry of valid username and password, Voyager admin redirects back to the login page. 我只是注意到,在输入有效的用户名和密码后,旅行者管理员将重定向到登录页面。 I have no idea yet where to go to and what codes to check. 我不知道要去哪里以及要检查什么代码。 Is there any config for Voyager admin for me to update? Voyager管理员有任何配置可以更新吗?

Many probable causes here. 这里有许多可能的原因。 In my experience, when that happens: 以我的经验,发生这种情况时:

  • It may be the user you are logging in with has an admin role (or admin access) on your localhost but does not have "Browser Admin" permissions in your production database. 您登录时使用的用户可能是在本地主机上具有管理员角色(或管理员访问权限),但在生产数据库中没有“浏览器管理员”权限的用户。 If there is another admin account, use that and check if the user's role has "Browse Admin" permissions. 如果还有另一个管理员帐户,请使用该帐户,并检查用户角色是否具有“浏览管理员”权限。
  • If the user is supposed to be an admin, SSH into your server and grant them the privilege with php artisan voyager:admin your@email.com , replacing that email there with the correct one. 如果该用户应该是管理员,请SSH进入您的服务器使用php artisan voyager:admin your@email.com 授予他们特权 ,用正确的电子邮件替换该电子邮件。
  • Account does not exist, so create it with php artisan voyager:admin your@email.com --create . 帐户不存在,因此请使用php artisan voyager:admin your@email.com --create创建帐户。

There is a voyager.php file for the configuration options of Voyager. Voyager的配置选项有一个voyager.php文件。

The Voyager config file is present at below location : Voyager配置文件位于以下位置:

Laravel/config/voyager.php

For more info please refer the documentation : 有关更多信息,请参阅文档:

Voyager Documentation for config Voyager配置文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM