dingo / api

A RESTful API package for the Laravel and Lumen frameworks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

group 404 not fonund

mk-fangkuai opened this issue · comments

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 8.12
Package version 3.0.5
PHP version 8.0.1

1223/5000

# # # Actual behavior

api.php

$api = app('Dingo\Api\Routing\Router');

$api->group(["version"=>"v1","namespace"=>"\App\Http\Controllers\Admin","prefix"=>"admin"], function ($api) {

$api->get("login","LoginController@login")->name("admin.login");

});

404 not found

sail@caca0a954c1f:/var/www/html$ php artisan api:routes

+------+----------+-------------+-------------+--------------------------------------------------+-----------+------------+----------+------------+

| Host | Method | URI | Name | Action | Protected | Version(s) | Scope(s) | Rate Limit |

+------+----------+-------------+-------------+--------------------------------------------------+-----------+------------+----------+------------+

| | GET|HEAD | admin/login | admin.login | App\Http\Controllers\Admin\LoginController@login | No | v1 | | |

+------+----------+-------------+-------------+--------------------------------------------------+-----------+------------+----------+------------+