<?php
use App\LaborCompany;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateLaborCompaniesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('labor_companies', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('劳务所id');
            $table->string('name')->unique()->nullable()->comment('劳务所名称');
            $table->timestamps();
        });
        //(new LaborCompany(['name'=>'其他']))->save();
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('labor_companies');
    }
}
