you need to set up your .env file
Error 405 with Email Verification and Vue Front End
As I understand it an email verification should happen when the user is logged into Laravel. Since I am using Vue as my front end I do not want to require the user to be logged in when I verify their email. In the construct function of the Verification Controller there were some lines of code adding additional guards to my verify route ( ie signed, auth and throttle). I commented them and now when I run the command php artisan route:list and it shows my route looks like this.
| | POST | api/auth/verify/{email-token} | | App\Http\Controllers\Auth\VerificationController@verify | api |
However, I am getting an error 405, Method Not Allowed. Any ideas what else could be causing my route to not be allowed to this method?
It appears my route was the issue. Route parameters are not allowed to contain a hyphen (-).
Quote from the Laravel Docs. https://laravel.com/docs/5.8/routing#required-parameters
"Route parameters are always encased within {} braces and should consist of alphabetic characters, and may not contain a - character."
Please or to participate in this conversation.