I have a front-end running on Nuxt and Laravel as a back-end service. When I generate the signedURL using the Laravel's API middleware - the path includes "api" in the URL, resulting into a page not found exception on the Nuxt side
So, here are the steps to better understand what's happening:
- User clicks a button in Nuxt application and sends the ajax request to the Laravel API
- API Controller generates the signedURL
$signedUrl = URL::signedRoute('register', ['email' => $this->request->email, 'group_id' => $this->request->group_id], null, false);
- Generated URL includes the "api" in the path, which of course, cannot be accessed
http://localhost:3000/api/register?email=ss%40gmail.com&group_id=2&signature=ce4fba05bf5ccae6ea20a6043a47ca11de603238214deda7202d19f2989272cb
Is there a way to get rid of the /api/ from the generated URL? I've tried setting 4th param (absolute) in the method signedRoute to false, but it doesn't help.