develop
Last change
on this file since 194a359 was 7304c7f, checked in by beratkjufliju <kufliju@…>, 3 years ago |
added user authentication, create & forgot password methods and blades
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | use Illuminate\Support\Str;
|
---|
4 | use Illuminate\Support\Facades\Schema;
|
---|
5 | use Illuminate\Database\Schema\Blueprint;
|
---|
6 | use Illuminate\Database\Migrations\Migration;
|
---|
7 |
|
---|
8 | class CreateUsersTable extends Migration
|
---|
9 | {
|
---|
10 | /**
|
---|
11 | * Run the migrations.
|
---|
12 | *
|
---|
13 | * @return void
|
---|
14 | */
|
---|
15 | public function up()
|
---|
16 | {
|
---|
17 | Schema::create('users', function (Blueprint $table) {
|
---|
18 | $table->increments('id');
|
---|
19 | $table->string('name');
|
---|
20 | $table->string('surname');
|
---|
21 | $table->string('username')->unique();
|
---|
22 | $table->string('password');
|
---|
23 | $table->string('email')->unique();
|
---|
24 | $table->string('mobile_number')->unique();
|
---|
25 | $table->integer('role_id')->unsigned();
|
---|
26 | $table->foreign("role_id")->references("id")->on("roles");
|
---|
27 | $table->boolean('is_active')->default(false);
|
---|
28 | $table->boolean('is_online')->default(false);
|
---|
29 | $table->boolean('is_confirmed')->default(false);
|
---|
30 | $table->boolean('is_forgot_password')->default(false);
|
---|
31 | $table->integer('security_code')->nullable();
|
---|
32 | $table->string('verify_token')->nullable();
|
---|
33 | $table->rememberToken();
|
---|
34 | $table->timestamps();
|
---|
35 | });
|
---|
36 | }
|
---|
37 |
|
---|
38 | /**
|
---|
39 | * Reverse the migrations.
|
---|
40 | *
|
---|
41 | * @return void
|
---|
42 | */
|
---|
43 | public function down()
|
---|
44 | {
|
---|
45 | Schema::dropIfExists('users');
|
---|
46 | }
|
---|
47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.