Php 拉威尔404护照

Php 拉威尔404护照,php,laravel,vue.js,laravel-5.4,laravel-passport,Php,Laravel,Vue.js,Laravel 5.4,Laravel Passport,我使用Laravel文档安装了Laravel Passport,Laravel版本是5.4 到目前为止,一切都很顺利。现在,我在视图中添加以下行: <!-- let people make clients --> <passport-clients></passport-clients> <!-- list of clients people have authorized to access our account

我使用Laravel文档安装了Laravel Passport,Laravel版本是5.4

到目前为止,一切都很顺利。现在,我在视图中添加以下行:

      <!-- let people make clients -->
      <passport-clients></passport-clients>

      <!-- list of clients people have authorized to access our account -->
      <passport-authorized-clients></passport-authorized-clients>

      <!-- make it simple to generate a token right in the UI to play with -->
      <passport-personal-access-tokens></passport-personal-access-tokens>
我的Chrome开发控制台显示了以下内容:

GET http://192.168.3.80/oauth/tokens 404 (Not Found) app.js:1175
GET http://192.168.3.80/oauth/personal-access-tokens 404 (Not Found) app.js:1175
GET http://192.168.3.80/oauth/scopes 404 (Not Found) app.js:1175
我按照文档中的步骤编写:

之后,我按照视频中相同的步骤进行操作,但仍然不起作用

如果我按下一个按钮,我会在开发人员控制台中看到这个post错误:

邮政404(未找到) 邮政404(未找到) 邮政404(未找到)

那么这是因为路径

vue文件显示了以下内容:

客户端.vue

        store() {
            this.persistClient(
                'post', '/oauth/clients',
                this.createForm, '#modal-create-client'
            );
        },

侧通道通信(IRC)显示Laravel安装在子路径中(
http://192.168.3.80/myapp/public/
),URL假定应用程序位于根目录中

解决方案是更改Web服务器配置,并将根目录(nginx)或文档根目录(apache)设置为Laravel的公用文件夹。

添加。。在url“/oauth/personal access tokens”前面加“./oauth/personal access tokens” 对其他URL也一样
它将在你的
.env
文件中的laravel 5.8

设置
APP_DEBUG=true
,这样你就可以看到详细的错误。设置为true在哪里可以看到详细的错误?然后你应该在
哇!出了点问题
artisan route:list
打印什么?您应该有
Passport::routes()AuthServiceProvider
中的
boot()
方法的末尾,单击code>。你检查过了吗?如何更改配置,以及更改哪些行?这基本上就是他的意思。我相信您将把站点部署到一个虚拟专用服务器上,在那里您将拥有虚拟主机。这就是说,如果您将虚拟主机指向laravel公用文件夹,站点将使用它作为根目录,这将很好地工作。无需更改URL以及其他内容。如果你是部署到FTP主机,那么你将有更多的痛苦比上述(我不知道如何解决)。因此,如果您要部署到VPS,为了支持本地开发,请始终使用
php artisan Service
,它将从公共位置运行站点,URL将正常工作。
        store() {
            this.persistClient(
                'post', '/oauth/clients',
                this.createForm, '#modal-create-client'
            );
        },