API - POST request

Hey there!

I guess this question is a big one and many people might be interested in the solution, but I want to simply extend the Content API functionality to be able to also POST some simple requests. For instance, I would love to be able to change the title of an entry I have.

I have a strong Laravel background, so I know how to build a custom API. Here I could build a new resource, let's say "Exercice" and accept full CRUD methods. The question is more: what is the best way to modify the "title" field in my content/collections/exercices/myslug.md". Doing it manually is very easy, but how to do it programmatically? Is there a Model somewhere for my Exercice collection?

I will need to dig more in the core scripts of Statamic to better understand how they do it when you change it in the Control Panel...

Thanks for your help! :)

>>>>>>> Unanswered <<<<<<<
1 Reply
1 Follower