Skip to content

Commit

Permalink
Update 03_one-to-many.md
Browse files Browse the repository at this point in the history
Fixed twill command to create module in the One to Many relations docs
  • Loading branch information
daisonth authored and ifox committed Jul 10, 2024
1 parent a2a0539 commit 76aaf0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/1_docs/6_relations/03_one-to-many.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ One to Many is one of the simpler relations to set up so let's get started:

As with any relation we need to set up a database. In this example we are using our portfolio example where we will have multiple links on a project.

We will set up 2 models, one is a Project model, you can do this using `php artisan twill:module Project`
We will set up 2 models, one is a Project model, you can do this using `php artisan twill:make:module Project`

And afterwards a Link model: `php artisan twill:module Link`, As the Link model is used for our hasMany, we do not have to add it to the routes or navigation files, so you can ignore that suggestion.
And afterwards a Link model: `php artisan twill:make:module Link`, As the Link model is used for our hasMany, we do not have to add it to the routes or navigation files, so you can ignore that suggestion.

In the **Link** migration we add a column to hold the `project_id` that we are creating it from.

Expand Down

0 comments on commit 76aaf0e

Please sign in to comment.