Skip to content

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

Merged
taylorotwell merged 1 commit intolaravel:11.xfrom
utsavsomaiya:allow-can-attribute-on-group
Feb 17, 2025
Merged

[11.x] Allow can attribute on group#54648
taylorotwell merged 1 commit intolaravel:11.xfrom
utsavsomaiya:allow-can-attribute-on-group

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
pdewit pushed a commit to pdewit/framework that referenced this pull request Sep 16, 2025
pdewit added a commit to pdewit/framework that referenced this pull request Sep 16, 2025
pdewit added a commit to pdewit/framework that referenced this pull request Sep 16, 2025
pdewit added a commit to pdewit/framework that referenced this pull request Sep 16, 2025
tegos pushed a commit to tegos/laravel-framework that referenced this pull request Sep 28, 2025
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