Skip to content

Commit

Permalink
Dang markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyWay committed Mar 2, 2015
1 parent 7d3bb8f commit f1596fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ There's also a secret bit of sugar for when you need to generate foreign constra
php artisan make:migration:schema create_posts_table --schema="user_id:integer:foreign, title:string, body:text"
```

Notice that "foreign" option (user_id:integer:foreign`)? That's special. It signals that user_id` should receive a foreign constraint. Following conventions, this will give us:
Notice that "foreign" option (`user_id:integer:foreign`)? That's special. It signals that user_id` should receive a foreign constraint. Following conventions, this will give us:

```
$table->integer('user_id');
Expand All @@ -184,7 +184,7 @@ $table->foreign('user_id')->references('id')->on('users');

As such, for that full command, our schema should look like so:

```
``
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->integer('user_id');
Expand Down

0 comments on commit f1596fa

Please sign in to comment.