created a migration
This commit is contained in:
parent
e5c98e6535
commit
a7c3c95d8e
@ -18,7 +18,7 @@ class SignupController extends Controller
|
||||
"name" => "required|max:16",
|
||||
"username" => "required|unique:users|min:3|max:16",
|
||||
"email" => "required|unique:users|email|max:64",
|
||||
"password" => "required|min:8|max:64",
|
||||
"password" => "required|min:8|max:64|confirmed",
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string("username");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn("username");
|
||||
});
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user