id(); $table->string('name'); $table->string('fiscal_code', 16)->nullable(); $table->string('vat', 16)->nullable(); $table->string('address')->nullable(); $table->string('zip_code', 5)->nullable(); $table->unsignedBigInteger('nation_id')->nullable(); $table->foreign('nation_id')->nullable()->references('id')->on('nations')->onUpdate('cascade')->onDelete('cascade'); $table->unsignedBigInteger('province_id')->nullable(); $table->foreign('province_id')->nullable()->references('id')->on('provinces')->onUpdate('cascade')->onDelete('cascade'); $table->unsignedBigInteger('city_id')->nullable(); $table->foreign('city_id')->nullable()->references('id')->on('cities')->onUpdate('cascade')->onDelete('cascade'); $table->string('referent')->nullable(); $table->string('website')->nullable(); $table->string('phone')->nullable(); $table->string('email')->nullable(); $table->integer('enabled')->default(1); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('suppliers'); } };