I'm usually working on Backends with PHP and ZF/Laminas.
Now I'm building a headless (only Backend) Craft CMS website and have a couple of questions that I didn't find a clear answer on. The Craft CMS project is developed "offline" with Vagrant+Docker and has currently no frontend and won't have it in the near future.
- The authors should be able to create an entry (fieldset has only a text) that contains a name. I want to be able to work with the created entry like with a variable/item so I can link other entries and modules to it. Is there a way to do it in the Craft backend itself or in PHP in a controller for example? As I'm working headless, I'm not able to do twig as I don't have the templates or any kind of frontend for now.
- The users should be able to upload files and link them to an created item from an author.
- What's the best way to fetch these data? I'd like to be able to fetch all (or filter for files or text entries etc.) uploaded files or associated entries to that item.
Is it possible to get the content from specific entries out of my database executing SQL statements in PHP and use the data within a controller?
I'd like to have the newly created entries (by authors) dynamically as items that users can link their uploaded files to.
I'm very thankful for any kind of help!