質問編集履歴
1
実行したマイグレーションファイルを追加致しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -12,4 +12,81 @@
|
|
12
12
|
|
13
13
|
しかし、どのファイルをいじることで文字数を減らすことができるのか分かりません。
|
14
14
|
|
15
|
-
ご存知の方はご教示して頂けたら幸いです。
|
15
|
+
ご存知の方はご教示して頂けたら幸いです。
|
16
|
+
|
17
|
+
【補足情報】
|
18
|
+
|
19
|
+
```ここに言語を入力
|
20
|
+
<?php
|
21
|
+
|
22
|
+
use Illuminate\Support\Facades\Schema;
|
23
|
+
use Illuminate\Database\Schema\Blueprint;
|
24
|
+
use Illuminate\Database\Migrations\Migration;
|
25
|
+
|
26
|
+
class CreateUsersTable extends Migration
|
27
|
+
{
|
28
|
+
/**
|
29
|
+
* Run the migrations.
|
30
|
+
*
|
31
|
+
* @return void
|
32
|
+
*/
|
33
|
+
public function up()
|
34
|
+
{
|
35
|
+
Schema::create('users', function (Blueprint $table) {
|
36
|
+
$table->increments('id');
|
37
|
+
$table->string('name');
|
38
|
+
$table->string('email')->unique();
|
39
|
+
$table->string('password');
|
40
|
+
$table->rememberToken();
|
41
|
+
$table->timestamps();
|
42
|
+
});
|
43
|
+
}
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Reverse the migrations.
|
47
|
+
*
|
48
|
+
* @return void
|
49
|
+
*/
|
50
|
+
public function down()
|
51
|
+
{
|
52
|
+
Schema::dropIfExists('users');
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
```
|
57
|
+
|
58
|
+
```
|
59
|
+
<?php
|
60
|
+
|
61
|
+
use Illuminate\Support\Facades\Schema;
|
62
|
+
use Illuminate\Database\Schema\Blueprint;
|
63
|
+
use Illuminate\Database\Migrations\Migration;
|
64
|
+
|
65
|
+
class CreatePasswordResetsTable extends Migration
|
66
|
+
{
|
67
|
+
/**
|
68
|
+
* Run the migrations.
|
69
|
+
*
|
70
|
+
* @return void
|
71
|
+
*/
|
72
|
+
public function up()
|
73
|
+
{
|
74
|
+
Schema::create('password_resets', function (Blueprint $table) {
|
75
|
+
$table->string('email')->index();
|
76
|
+
$table->string('token')->index();
|
77
|
+
$table->timestamp('created_at')->nullable();
|
78
|
+
});
|
79
|
+
}
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Reverse the migrations.
|
83
|
+
*
|
84
|
+
* @return void
|
85
|
+
*/
|
86
|
+
public function down()
|
87
|
+
{
|
88
|
+
Schema::dropIfExists('password_resets');
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
```
|