Skip to content

Instantly share code, notes, and snippets.

@mercuryseries
Created September 26, 2016 06:54
Show Gist options
  • Save mercuryseries/d62dd90e235f3e1a141d859b06dff344 to your computer and use it in GitHub Desktop.
Save mercuryseries/d62dd90e235f3e1a141d859b06dff344 to your computer and use it in GitHub Desktop.
Basic Authentication Laravel Users Table Migration [Example]
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password_digest');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment