
Repeat with Category: click the checkboxes next to find and findOne.īy default, any content you create is saved as a draft.Click the checkboxes next to find and findOne.In the Permissions tab, find Restaurant and click on it.Under Users & Permissions Plugin, choose Roles.Click on General Settings at the bottom of the main navigation.But first, we need to make sure that the content is publicly accessible through the API:

We now have enough content to consume (pun intended). We have just added a restaurant and 2 categories. In the Categories drop-down list, select "Brunch". Go to Content Manager > Collection types - Restaurant in the navigation, and click on "Biscotte Restaurant". The "French Food" and "Brunch" categories are now listed in the Collection types - Category view.

If you're lacking some inspiration, you can use Welcome to Biscotte restaurant! Restaurant Biscotte offers a cuisine based on fresh, quality products, often local, organic when possible, and always produced by passionate producers.

Type the name of your favorite local restaurant in the Name field.Go to Content Manager > Collection types - Restaurant in the navigation.Create an entry for the "Restaurant" collection type Now that we have created a basic data structure with 2 collection types, "Restaurant" and "Category", let's use them to actually add content by creating new entries. Step 2: Use the collection types to create new entries Finally, click Finish, then the Save button, and wait for Strapi to restart.The text should read Categories has and belongs to many Restaurants. In the center, select the icon that represents "many-to-many".Type Category for the Display name, and click Continue.Go to Plugins Content-type Builder in the main navigation.Let's create a "Category" collection type: It would help getting a bit more organized if our restaurants directory had some categories. Wow, you have just created your very first content-type! It was so cool - let's create another one right now, just for pleasure. Once Strapi has restarted, "Restaurant" is listed under Content Manager > Collection types in the navigation. Finally, click Save and wait for Strapi to restart.Type Description under the Name field, then click Finish.

Switch to the Advanced Settings tab, and check the Required field and the Unique field settings.Type Restaurant for the Display name, and click Continue.If it's not showing up, go to Plugins Content-type Builder in the main navigation. Click on the Create your first Content type button.Then we can describe the fields to display when adding a new restaurant entry: Your restaurants directory will eventually include many restaurants, so we need to create a "Restaurant" collection type. When creating an empty project with Strapi, this is where to get the party started! Create a "Restaurant" collection type The Content-type Builder plugin helps you create your data structure. Step 1: Create collection types with the Content-type Builder If the server is not already running, in your terminal, cd into the my-project folder and run npm run develop (or yarn develop) to launch it.
