Hook function for all models

System Information
  • Strapi Version: 3.3.3
  • Operating System: centos7
  • Database: mysql
  • Node Version: 12
  • NPM Version:
  • Yarn Version:

Hi
I wanted to access the values of each model before creating or updating it
i see some functions such as beforeCreate and … in models but i want to use that for all models in middleware
in other word function to call it beforeCreateEachModel
there is any function to do it or not ?
thanks

no, there are no such functions

i find hooks in bookshelf
https://bookshelfjs.org/api.html#Model-event-created
have any idea how can use it

I think I misunderstood your question at the beginning, can you explain a bit more detail what exactly are you trying to achieve? Since “calling a beforeCreate on all models” doesn’t give much information.