Skip to content

Instantly share code, notes, and snippets.

@blogcacanid
Created November 8, 2020 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blogcacanid/ca3b1620f4cc6f539ffc56c26a44a075 to your computer and use it in GitHub Desktop.
Save blogcacanid/ca3b1620f4cc6f539ffc56c26a44a075 to your computer and use it in GitHub Desktop.
2020_XXX_create_users_table.php Authentication JWT Lumen 7
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('username')->unique();
$table->string('email')->unique();
$table->string('password');
$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