v0.10.0h - Fixed phone number bug, changed phone number from int to string

This commit is contained in:
Neerholt 2020-08-17 14:42:58 +02:00
parent d4bc3f5520
commit 0144fb8586
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ class UserController extends Controller
"name_last" => "required|max:255", "name_last" => "required|max:255",
"email" => "required", "email" => "required",
"password" => "required|max:60", "password" => "required|max:60",
"phone" => "required", "phone" => "required|max:8|min:8",
]); ]);
$allUsersEmail = User::query()->where('email', '=', $request->email)->get(); $allUsersEmail = User::query()->where('email', '=', $request->email)->get();

View File

@ -26,7 +26,7 @@ class CreateUsersTable extends Migration
$table->string('email')->unique(); $table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable(); $table->timestamp('email_verified_at')->nullable();
$table->string('password'); $table->string('password');
$table->integer("phone")->unique(); $table->string("phone", 8)->unique();
$table->rememberToken(); $table->rememberToken();
$table->foreignId("resource_id")->nullable()->constrained("resources", "id"); $table->foreignId("resource_id")->nullable()->constrained("resources", "id");
$table->boolean("wants_emails")->default(true); $table->boolean("wants_emails")->default(true);