Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Allow can attribute on group #54648

Merged

Conversation

utsavsomaiya
Copy link
Contributor

<?php

Route::prefix('settings/users')
-    ->middleware(Authorize::using(Permission::MANAGE_USERS))
+    ->can(Permission::MANAGE_USERS)
    ->group(function (): void {
        Route::get('/', [UserController::class, 'index'])->name('settings.users.index');
        Route::post('update/{user}', [UserController::class, 'update'])->name('settings.users.update');
        Route::post('suspend/{user}', [UserController::class, 'suspend'])->name('settings.user.suspend');
        Route::post('restore/{user}', [UserController::class, 'restore'])->name('settings.user.restore');
    });

@utsavsomaiya utsavsomaiya changed the title Allow can attribute on group [11.x] Allow can attribute on group Feb 17, 2025
@utsavsomaiya utsavsomaiya force-pushed the allow-can-attribute-on-group branch from 5819274 to 9f71c1e Compare February 17, 2025 10:13
@utsavsomaiya utsavsomaiya force-pushed the allow-can-attribute-on-group branch from 9f71c1e to 00d540d Compare February 17, 2025 10:14
@taylorotwell taylorotwell merged commit 78e29ab into laravel:11.x Feb 17, 2025
44 checks passed
@utsavsomaiya utsavsomaiya deleted the allow-can-attribute-on-group branch February 17, 2025 17:16
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