<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateCompaniesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('companies', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('imageCompany')->nullable(); $table->string('company_name'); $table->string('company_owner'); $table->string('phone_no'); $table->string('email'); $table->string('fax')->nullable(); $table->string('website')->nullable(); $table->string('addr'); $table->string('tambon'); $table->string('amphoe'); $table->string('province'); $table->string('zipcode'); $table->string('imageMap')->nullable(); $table->string('lat')->nullable(); $table->string('long')->nullable(); $table->string('about')->nullable(); $table->string('bts')->nullable(); $table->string('mrt')->nullable(); $table->string('arl')->nullable(); $table->string('bus')->nullable(); $table->string('another')->nullable(); $table->unsignedBigInteger('user_id'); $table->foreign('user_id')->references('id')->on('users'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('companies'); } }