I’ve just discovered this CMS and it’s perfect for a project. However, it’s not very well documented and I can’t find how to use the custom PHP code for API endpoinds.
- How can be validated a call to create a new row inside a location? What’s the structure of the code? How can I get the body?
- How can I override the return of a get call on a collection?
Most of the platform that I need to make can be configured with no-code, but some parts need some programming. I don’t know how to use these:
Many thanks and great job with this headless CMS. I’ll try to contribute by developing some more documenation.
Well, fast forward two weeks and let me tell you what I’ve discovered.
That screenshot I’ve uploaded it allows php code, but not for I wanted. Using a combination of debugging tools and some posts, this code is to write custom code for access purposes. For example, imagine that you only want to disallow edit for certain user, you could do this by specifying the user and returning false.
Fow what I wanted to do, I needed to create a custom endpoint.
It’s a shame that this project is so under documented, because it’s great. It shove off at least two weeks of work, but if well documented, it could have saved me even more. When I have more time I’ll try to contribute by documenting at least what I discovered.