Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

devzeps's avatar

This action is unauthorized

first off, go easy on me, its my first question asking for help. I will give my best to provide as much data as possible to help me.

TL;DR - My php artisan route:list won't work. Error Message -> This action is unauthorized after set up "profile/{user}/show"

Steps I've done so far:

  • check Middlewares and comment out functions
  • installed laravel-permission -> composer require spatie/laravel-permission

My Main issue that I cant debug or even know where to look for debugging. It's okay for me to not just "give the solution" and help me through hints. Still I've made so far that im completely lost.

Why I needed "route:list" I want to show my Profile with the show method which isnt set up in my route (but it is, so i came to "route:list") and now im Stuck.

Sorry for any more missing information I didn't provide. Thanks for any informations or steps to do

0 likes
4 replies
devzeps's avatar

Case - View: Show

Route: Route::get('/profile/{user}/show', [\App\Http\Controllers\ProfileController::class, 'show'])->name('profile.show');

Gives: Route [profile.show] not defined.

Tried: php artisan route:list

Stuck on: "This action is unauthorized"

Hope thats more clear.

devzeps's avatar

@MohamedTammam somehow i skipped / oversaw this part even when i repeated it several times. Now I can continue working. Much appreciate.

step 4:

'providers' => [ // ... Spatie\Permission\PermissionServiceProvider::class, ];

did the work

Please or to participate in this conversation.