Open DevDev1 opened 8 years ago
Hello DevDev1,
controllers are 'auto-magical' in Apigility. You don't have (Status)Controller.php file, but it exists.
In your case, you want to block GET /status, which is "collection GET".
Collection is status/
. Entity would be status/1
.
You should try:
'rest_guard' => [
'Status\\V1\\Rest\\Status\\Controller' => [
'collection' => [
'GET' => ['canDoFoo']
],
]
]
Now define canDoFoo using the rest of the recipe.
I'm not interested in developing your program. This recipe should be enough to modify Apigility autogenerated code.
Hi there,
While reading recipe I think (from what I learned) that something changed in Apigility since recipe is written
I believe StatusLib do not have classic controller? (there are StatusCollection.php, StatusEntity.php, StatusResource.php, StatusResourceFactory.php)
If you agree we can do skeleton together (I believe I'll need some help to make things work) and you can use it and provide it as example code with recipe? What do you think?