diff options
author | Camil Staps | 2016-09-04 23:30:15 +0200 |
---|---|---|
committer | Camil Staps | 2016-09-04 23:30:15 +0200 |
commit | c61b156f1bd93ec4aadd8adc78523b42b0232918 (patch) | |
tree | cd9bcb6f889dcf554818246957bed54eb14c9fbe /database | |
parent | Use blade templates (diff) |
User creation and authentication
Diffstat (limited to 'database')
-rw-r--r-- | database/migrations/2016_09_04_081740_create_users_table.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/database/migrations/2016_09_04_081740_create_users_table.php b/database/migrations/2016_09_04_081740_create_users_table.php new file mode 100644 index 0000000..c5586dc --- /dev/null +++ b/database/migrations/2016_09_04_081740_create_users_table.php @@ -0,0 +1,33 @@ +<?php + +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('email')->unique(); + $table->string('name')->unique(); + $table->string('password'); + $table->integer('points')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('users'); + } +} |