Skip to content

Commit 7bb4f08

Browse files
committed
add city state to addr
1 parent 28dd304 commit 7bb4f08

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

database/migrations/2020_01_01_000001_create_addresses_table.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ public function up()
2020
$table->morphs('addressable');
2121
$table->string('label')->nullable();
2222
$table->string('company')->nullable();
23-
$table->foreignId('country_id')->on('countries');
24-
$table->foreignId('state_id')->on('states');
25-
$table->foreignId('city_id');
23+
$table->foreignId('country_id')->on('countries')->nullable();
24+
$table->foreignId('state_id')->on('states')->nullable();
25+
$table->string('state')->nullable();
26+
$table->foreignId('city_id')->on('cities')->nullable();
27+
$table->string('city')->nullable();
2628
$table->string('line1')->nullable();
2729
$table->string('line2')->nullable();
2830
$table->string('street')->nullable();

0 commit comments

Comments
 (0)