Hi, I have a gallery and when i visit one of my gallery album my URL in a browser looks "http://127.0.0.1:8000/showalbum/15" like this. Then from there i want to visit my admin page and i click my admin link then it takes me to the wrong place URL: "http://127.0.0.1:8000/showalbum/admin" but it should be "http://127.0.0.1:8000/admin". If i am on my home page and i click my admin link then it takes me to the right place. I am using resource routing.
web.php
It's not a good idea to usehref="/admin". Imagine, someday, you want to change the url to "/secret-admin".. the you have to change it in all your code. By using named route, you just change it inside your routes/web.php
Are you sure aren't any "strange" redirects in your Admin@index function? What your HTML source code looks like when you inspect that "a" element?
Do you have a Middleware that redirects back the user if not authorized that maybe it's not working properly?