mirror of
https://github.com/strapi/strapi.git
synced 2025-08-13 03:07:32 +00:00
commit
18a65a7435
@ -82,7 +82,7 @@ module.exports = {
|
||||
|
||||
In this example, any time a web browser is pointed to the `/hello` URL on your app, the page will display the text: `Hello World!`.
|
||||
|
||||
### Where are defined the controllers?
|
||||
### Where are the controllers defined?
|
||||
|
||||
The controllers are defined in each `./api/**/controllers/` folders. Every JavaScript file put in these folders will be loaded as a controller. They are also available through the `strapi.controllers` and `strapi.api.**.controllers` global variables. By convention, controllers' names should be Pascal-cased, so that every word in the file (include the first one) is capitalized `User.js`, `LegalEntity.js`.
|
||||
|
||||
@ -144,7 +144,7 @@ module.exports = {
|
||||
In this example, there is a `User` model which contains two attributes `firstname` and `lastname`.
|
||||
|
||||
|
||||
### Where are defined the models?
|
||||
### Where are the models defined?
|
||||
|
||||
The models are defined in each `./api/**/models/` folder. Every JavaScript or JSON file put in these folders will be loaded as a model. They are also available through the `strapi.models` and `strapi.api.**.models` global variables. Usable everywhere in the project, they contains the ORM model object that they are referring to. By convention, models' names should be Pascal-cased, so that every word in the file (include the first one) is capitalized `User.js`, `User.settings.json`, `LegalEntity.js`, `LegalEntity.settings.json`.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user