Hi all,
Does Kirby support nested custom API routes like below? I’ve got the following setup in a plugin but getting a 404 when hitting /api/roles/resources
. I’m on v4.7.0.
/api/roles
/api/roles/resources
./my-plugin/extensions/api.php
<?php
return [
'routes' => [
[
'pattern' => 'roles',
'action' => function () {
$role = new Role();
return $role->getAllRoles();
}
],
[
'pattern' => 'roles/resources',
'action' => function () {
$resource = new Resource();
return $resource->getAllResources('wunderbaum');
}
],
]
];