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 = [ protected $fillable = [
'name', 'name',
'email', 'matrix_username',
'password', 'phone',
];
/**
* 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',
]; ];
} }

@ -14,10 +14,8 @@ return new class extends Migration
Schema::create('users', function (Blueprint $table) { Schema::create('users', function (Blueprint $table) {
$table->id(); $table->id();
$table->string('name'); $table->string('name');
$table->string('email')->unique(); $table->string('matrix_username')->unique();
$table->timestamp('email_verified_at')->nullable(); $table->string('phone')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps(); $table->timestamps();
}); });
} }

Loading…
Cancel
Save