filament-api icon indicating copy to clipboard operation
filament-api copied to clipboard

Route [login] Not Defined: Symfony\Component\Routing\Exception with tomatophp/filament-api Package

Open pky1341 opened this issue 1 year ago • 1 comments

Description: The application throws a Symfony\Component\Routing\Exception\RouteNotFoundException with the message Route [login] not defined. when accessing specific routes in the application. This issue occurs while using the tomatophp/filament-api package.

Steps to Reproduce

  1. Send a GET request to the route:

GET https://app.revalesuva.test/api/users

  1. Observe the error in the response: 500 Internal Server Error Symfony\Component\Routing\Exception\RouteNotFoundException: Route [login] not defined.

Expected Behavior The route should execute without any errors, returning the expected response.

Actual Behavior The application throws a RouteNotFoundException for the login route, indicating it is not defined.

Possible Cause The issue may arise due to the following reasons:

The login route is not explicitly defined in the application’s web.php or api.php route files. The tomatophp/filament-api package may rely on Laravel’s default authentication scaffolding, and the required login route is missing. Middleware or package configuration issues causing a reference to an undefined route.

Suggestions Documentation Update: Ensure that the package documentation includes clear instructions for defining the required routes, especially for authentication.

Validation: Add validation logic in the package to verify if required routes (e.g., login) are defined during setup.

Fallback Handling: Implement fallback logic in the package to avoid breaking the application when certain routes are missing.

Supporting Files

"require": { "tomatophp/filament-api": "", "laravel/framework": "11.34.2" }

Screenshot 2024-12-09 at 5 57 59 PM

Additional Context Please confirm whether the login route is required by the tomatophp/filament-api package or if additional configuration steps are missing in the documentation.

pky1341 avatar Dec 09 '24 12:12 pky1341