Add Login & Register

This commit is contained in:
R
2022-09-15 11:47:36 +07:00
parent a3b95615d7
commit 300b53942d
40 changed files with 658 additions and 3 deletions

View File

@@ -16,9 +16,13 @@ return new class extends Migration
Schema::create('users', function (Blueprint $table) {
$table->id();
// $table->string('name');
$table->string('email')->unique();
$table->string('email')->unique()->nullable();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('password')->nullable();
$table->string('phone')->unique()->nullable();
$table->timestamp('phone_verified_at')->nullable();
$table->string('otp', 10)->nullable();
$table->timestamp('otp_created_at')->nullable();
$table->rememberToken();
$table->timestamps();
});

View File

@@ -0,0 +1,43 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('addresses', function (Blueprint $table) {
$table->id();
$table->morphs('addressable');
$table->string('use')->nullable();
$table->string('type')->nullable();
$table->text('text')->nullable();
$table->text('line')->nullable();
$table->foreignId('province_id')->nullable();
$table->foreignId('city_id')->nullable();
$table->foreignId('district_id')->nullable();
$table->foreignId('village_id')->nullable();
$table->string('postal_code')->nullable();
$table->string('rt')->nullable();
$table->string('rw')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('addresses');
}
};