Any reason why ? That does not sound very "single responsibility" to me :) Why not just have some actions that both controllers can call, and routes for api in the api.php file
Dec 8, 2020
2
Level 1
Use same API routes with Inertia and external calls
With Laravel 8 and Inertia, we would like to build our API that Intertia routes will be using, i.e. resource calls for models, but also have those same routes be available for our external applications to community.
Since we are using the sanctum middleware, how should we setup our middleware so both Intertia and external calls can properly authenticate, or will this work by default?
Please or to participate in this conversation.