Links not working after adding role to users #1277
-
I just started experimenting with Laravel 9 (Inertia + React) and wanted to set up user roles. I tried following the steps in this guide and got it working but now the login/register links on my Navbar layer stops working. The logout link works fine however. Directly typing and going to 127.0.0.1/login or 127.0.0.1/register works fine and the routes load as they should but clicking the links doesn't do anything (the progress bar moves but after it fills up, nothing happens). What is causing this? Snippets of my auth.php:
web.php:
Navbar.jsx:
Authenticated.jsx:
Guest.jsx:
RouteServiceProvider.php:
RedirectAuthenticatedUsersController:
N.B. Also, I was monitoring the By TLDR of N.B.: If I manually type and go to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured it out. The problem was because I was specifying the method for both login/register as POST requests instead of GET requests. Changing the method for both login and register to GET (as shown below) fixed the issue.
|
Beta Was this translation helpful? Give feedback.
Figured it out. The problem was because I was specifying the method for both login/register as POST requests instead of GET requests. Changing the method for both login and register to GET (as shown below) fixed the issue.