From ea363b956e22cd3035a20bafbe6617098c55b29e Mon Sep 17 00:00:00 2001 From: KKlochko Date: Thu, 15 Jun 2023 17:21:39 +0300 Subject: [PATCH] Update User class. Added the needed fields and removed unused fields. --- app/Models/User.php | 24 ++----------------- .../2014_10_12_000000_create_users_table.php | 6 ++--- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 4d7f70f..ceeaade 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -19,27 +19,7 @@ class User extends Authenticatable */ protected $fillable = [ 'name', - 'email', - 'password', - ]; - - /** - * The attributes that should be hidden for serialization. - * - * @var array - */ - protected $hidden = [ - 'password', - 'remember_token', - ]; - - /** - * The attributes that should be cast. - * - * @var array - */ - protected $casts = [ - 'email_verified_at' => 'datetime', - 'password' => 'hashed', + 'matrix_username', + 'phone', ]; } diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 444fafb..9f7aeb5 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -14,10 +14,8 @@ return new class extends Migration Schema::create('users', function (Blueprint $table) { $table->id(); $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); - $table->rememberToken(); + $table->string('matrix_username')->unique(); + $table->string('phone')->unique(); $table->timestamps(); }); }