*/ protected $fillable = [ 'username', 'matrix_username', 'phone', ]; public static function isExistByName(string $name): bool { $count = User::where('matrix_username', $name)->count(); return $count != 0; } public static function isNameValid(string $name): bool { return $name != ''; } }