*/ protected $fillable = [ 'username', 'email', 'password', 'is_under_14', ]; /** * 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', ]; public function verificationCodes() { return $this->hasMany(VerificationCode::class); } public function formattedEmailVerifiedAt() { return $this->email_verified_at ? 'Not verified' : Carbon::parse($this->email_verified_at)->format('j/m/Y'); } }