Skip to content

Conversation

@obahchimaobi
Copy link

The nativephp/laravel/routes/api.php file references App\Http\Middleware\VerifyCsrfToken, which doesn't exist. Updated the namespace to the correct path: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken

@obahchimaobi obahchimaobi changed the title Fixed incorrect namespace for VerifyCsrfToken middleware Fix: incorrect namespace for VerifyCsrfToken middleware Jan 16, 2025
@simonhamp
Copy link
Member

Are you seeing an error with this? I haven't bumped into any issues around this...

@obahchimaobi
Copy link
Author

Are you seeing an error with this? I haven't bumped into any issues around this...

I’m not encountering any errors at the moment. However, I noticed that the routes/api.php file references App\Http\Middleware\VerifyCsrfToken, which doesn’t exist in the project. The correct path seems to be Illuminate\Foundation\Http\Middleware\VerifyCsrfToken. I thought it might be worth addressing to improve clarity and maintain consistency. Please let me know your thoughts!

@simonhamp
Copy link
Member

It does exist in some projects. It was just removed by default in new Laravel 11 apps...

@simonhamp
Copy link
Member

Losing due to insctivity

@simonhamp simonhamp closed this Mar 31, 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