leaf icon indicating copy to clipboard operation
leaf copied to clipboard

How to add names for routes in groups

Open dragomano opened this issue 10 months ago • 1 comments

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

dragomano avatar Feb 27 '25 06:02 dragomano

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 avatar Feb 28 '25 16:02 mychidarko