Update User class.

Added the needed fields and removed unused fields.
main
KKlochko 2 years ago
parent 61a374dfc7
commit ea363b956e

@ -19,27 +19,7 @@ class User extends Authenticatable
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
'matrix_username',
'phone',
];
}

@ -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();
});
}

Loading…
Cancel
Save