Advertisement
Firdaus_Shinoda

2017_04_27_064810_cre.php

May 27th, 2017
2,097
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2.  
  3. use Illuminate\Support\Facades\Schema;
  4. use Illuminate\Database\Schema\Blueprint;
  5. use Illuminate\Database\Migrations\Migration;
  6.  
  7. class CreateTableEmploye extends Migration
  8. {
  9.     /**
  10.      * Run the migrations.
  11.      *
  12.      * @return void
  13.      */
  14.     public function up()
  15.     {
  16.         Schema::create('employees', function (Blueprint $table) {
  17.             $table->increments('id');
  18.             $table->string('nama',50);
  19.             $table->string('nip',10);
  20.             $table->string('tgl_lahir',10)->unique();
  21.             $table->enum('gender',['L','P']);
  22.             $table->integer('deleted');
  23.             $table->string('foto',100)->nullable();
  24.             $table->timestamps();//untuk cdate dan mdate otomatis
  25.         });
  26.     }
  27.  
  28.     /**
  29.      * Reverse the migrations.
  30.      *
  31.      * @return void
  32.      */
  33.     public function down()
  34.     {
  35.         Schema::dropIfExists('employees');
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement