add addresses
This commit is contained in:
parent
a5b7cb2bb8
commit
fb1a2a16f1
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAddress extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('addresses', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('customer_id');
|
||||
$table->string('name');
|
||||
$table->string('phone');
|
||||
$table->unsignedInteger('country_id');
|
||||
$table->unsignedInteger('state_id');
|
||||
$table->string('state');
|
||||
$table->unsignedInteger('city_id');
|
||||
$table->string('city');
|
||||
$table->string('zipcode');
|
||||
$table->string('address_1');
|
||||
$table->string('address_2');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('address');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue