Skip to content

How to add names for routes in groups #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dragomano opened this issue Feb 27, 2025 · 1 comment
Open

How to add names for routes in groups #279

dragomano opened this issue Feb 27, 2025 · 1 comment
Assignees

Comments

@dragomano
Copy link

Describe the bug

This works:

app()->get('/', ['name' => 'home', function () {
    render('index');
}]);

And this doesn't work:

app()->group('/admin', ['name' => 'admin', function () {
    app()->resource('/users', 'UsersController');
}]);

Expected behavior

I want to get routes such like these:

  • admin.users.index
  • admin.users.create
  • etc
@mychidarko
Copy link
Member

Hi @dragomano, this is not yet fully supported in Leaf. I'll keep this issue open and update you when it is added in one of our later releases

@mychidarko mychidarko added the Improvement label Apr 12, 2025 — with Linear
@mychidarko mychidarko self-assigned this Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants