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

Fix: incorrect namespace for VerifyCsrfToken middleware #469

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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...

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