Skip to content

Instantly share code, notes, and snippets.

@thannaske
Created May 18, 2018 17:48
Show Gist options
  • Save thannaske/c847844cd7d6cb362d65596c0c79ebba to your computer and use it in GitHub Desktop.
Save thannaske/c847844cd7d6cb362d65596c0c79ebba to your computer and use it in GitHub Desktop.
Migration for the Laravel e-mail address confirmation functionality
<?php
public function up()
{
Schema::create('users', function (Blueprint $table) {
// Default Laravel stuff
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
// E-mail address confirmation fields
$table->string('confirmation_token', 32)->nullable()->default(null);
$table->dateTime('confirmed_at')->nullable()->default(null);
// Further Laravel stuff
$table->rememberToken();
$table->timestamps();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment