walkor / walkor/webman-framework

Route 资源型路由 name 问题

Open
#46 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
148
Forks
68
Avg merge
1d 8h
Merged PRs (30d)
3

Description

```php
Route::group('/a', function () {
Route::resource('/x', app\admin\controller\AdminController::class);
});
Route::group('/b', function () {
Route::resource('/x', app\admin\controller\AdminController::class);
});
```

该形式可以注册 `/a/x/index` 和 `/b/x/index` 的路由,但是它们的 name 都是 `x.index`

目前看路由的 name 注册和获取太过直接了当,貌似没有太好的解决办法

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Route::group and Route::resource entry points shown in the issue, then trace how route names are registered and retrieved. Reproduce the two resource registrations under /a and /b and inspect their generated names. Done means the registrations no longer collide while both route groups remain usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.