有config/app.php
属性url
。
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
默认情况下,将其链接到名为APP_URL
.env
文件的属性。 XAMP通常要求您导航到localhost/project_folder
,然后才能访问您的项目,因此您需要将url
属性设置为您正在使用的属性。
其次,API路由通常以/api/
为前缀,并且需要一个X-REQUESTED-WITH: XMLHttpRequest
标头。
你好@pankaj欢迎Android开发:第一,提示是不是从APP(这是安装你的应用系统),您可以点击安装和包被更新(希望你有我的观点) – jagapathi
真正起作用的路由器列表您可以使用命令'php artisan route:list'来查看。你有没有试过这么做?你的名单上的地址? – Takamura
您确定这是正确的网址吗?首先,我认为API.php中的路由有一个api前缀,因此它应该是/ api/adminapi/public/api/v1/authenticateuser但是,您可能也有可能尝试通过项目和公共访问端点你应该从公共场合走出去。也许尝试/ api/v1/authenticate或/ api/api/v1/authenticate用户? –