Strange Issue with Filament and API Routes

Hi,

I have encountered strange issue when i update profile password and press button in UserMenu to signout i get Route login not defined error

->withRouting(
        web: __DIR__.'/../routes/web.php',
        api: __DIR__.'/../routes/api.php',
        commands: __DIR__.'/../routes/console.php',
        channels: __DIR__.'/../routes/channels.php',
        health: '/up',
        then: function () {
            Route::middleware('api')
                ->name('api.')
                ->prefix('api/v1')
                ->group(base_path('routes/api_v1.php'));
        }
    )


api.php

<?php

use App\Http\Controllers\Api\AuthController;
use Illuminate\Support\Facades\Route;

Route::prefix('api')
    ->name('api.')
    ->group(function () {
        Route::post('/login', [AuthController::class, 'login'])->name('login');
        Route::post('/logout', [AuthController::class, 'logout'])->name('logout');
    });


Any idea why it is mixing them up?
Was this page helpful?