Skip to content

Conversation

@jrd-lewis
Copy link
Contributor

@jrd-lewis jrd-lewis commented Nov 13, 2025

This PR will allow calls to Features::enabled(Features::updatePasswords) to be simplified can be updated by adding a canUpdatePasswords method in Features.php similar to the current canUpdateProfileInformation and canManageTwoFactorAuthentication methods.

Usage

Current:

if (Features::enabled(Features::updatePasswords())) {
    Route::get('settings/password', [PasswordController::class, 'edit'])
        ->name('password.edit');
}

After PR:

if (Features::canUpdatePasswords()) {
    Route::get('settings/password', [PasswordController::class, 'edit'])
        ->name('password.edit');
}

@jrd-lewis jrd-lewis changed the title [1.x] Add canUpdatePassword method [1.x] Add Features::canUpdatePassword method Nov 13, 2025
@jrd-lewis jrd-lewis changed the title [1.x] Add Features::canUpdatePassword method [1.x] Add Features::canUpdatePassword() method Nov 13, 2025
@taylorotwell taylorotwell merged commit bd38202 into laravel:1.x Nov 14, 2025
11 checks passed
@jrd-lewis jrd-lewis changed the title [1.x] Add Features::canUpdatePassword() method [1.x] Add Features::canUpdatePasswords() method Nov 15, 2025
@jrd-lewis jrd-lewis deleted the feature/add-canupdatepasswords branch November 15, 2025 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants