php artisan install:api
add routes/api.php
and app/bootstrap/app
->withRouting(
web: __DIR__ . '/../routes/web.php',
commands: __DIR__ . '/../routes/console.php',
api: __DIR__ . '/../routes/api.php', // add this line
health: '/up',
)