File: //var/www/html/punjabcabs/database/migrations/2017_01_11_180511_create_providers_table.php
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProvidersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('providers', function (Blueprint $table) {
$table->increments('id');
$table->string('first_name');
$table->string('last_name');
$table->string('email')->unique();
$table->string('mobile')->nullable();
$table->string('password');
$table->string('avatar')->nullable();
$table->string('printer_no')->nullable();
$table->decimal('rating', 4, 2)->default(5);
$table->enum('status', ['onboarding', 'approved', 'banned']);
$table->integer('fleet')->default(0);
$table->double('latitude', 15, 8)->nullable();
$table->double('longitude', 15, 8)->nullable();
$table->mediumInteger('otp')->default(0);
$table->rememberToken();
$table->integer('login_status')->nullable();
$table->timestamp('login_at')->nullable();
$table->timestamp('logout_at')->nullable();
$table->timestamps();
$table->enum('login_by',array('manual','facebook','google'));
$table->string('social_unique_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('providers');
}
}