Relative Content

Tag Archive for strapi

STRAPI CMS: OneToOne Relation Problem from one Collection

so i have the following problem at my strapi project:
I have a Collection called Player (Many Names) and a Component called Substitution.
Inside the Component i want to just select 2 Players from the Players Collection in 2 seperated fields. (PlayerOut, PlayerIn). So i’d say its a normal substitution case, but Strapi can’t handle that i put 2 relations on one Collection.

How to get Strapi relantionship fields in lifecycle methods

In my Inventory model, I have two relationships, one for supplier and one for the product. They are both 1 to many with Inventory. My question is how can I get these relationships from the event object that strapi generates in afterCreate or afterUpdate method. For example, here’s my code where I want to retrieve supplier and product info from the event object, unfortunately the event object doesn’t seem to have relationship fields, I only get these values:

Strapi Route aware global middleware

I’m looking for a way to, in Strapi, include a global middleware, but that has access to the route information, which appears to be absent when using a standard Global middleware, which makes sense as I understand it in the order middlewares are called.

How to deploy Strapi project with mysql database on hostinger?

I was working on a project where i have used strapi headless cms for the backend, used mysql as the database. Now i am looking forward to deploy it on hostinger. but i have not found any way there in online. Can anyone guide me on this that how to deploy this project?