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

ClementN's avatar

'verified' middleware automatically added to my API routes - is this normal?

Hello,

I notice that the 'verified' middleware is automatically added to an API route I create.

It shows in php artisan route:list

Is this normal? Is there a solution to remove it from the API route?

api.php

Route::post('validateModelName', 'ModelController@validateModelName')
                ->name('validateModelName');  

php artisan route:list

|        | POST      | api/validateModelName | validateModelName   |  App\Http\Controllers\ModelController@validateModelName | api,verified     

Context:

Laravel 7

Email Verification implemented

Thank you very much for your time.

0 likes
2 replies
Snapey's avatar

no, not normal

Do you have this middleware implemented in the controllers constructor?

I assume its not in api.php as this would be obvious

ClementN's avatar

Thank you very much, Snapey.

You are right... The middleware was in the controller constructor for other reasons and I didn't realize that will affect the API routes, too.

Again, thank you for pointing me in the right direction.

Please or to participate in this conversation.