Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

zelaza's avatar

How to Hide/Disable Nova API Routes?

Hi. I'm not using the Nova API routes at the moment so I would like to hide/disable them.

How can I do this?

Thanks

0 likes
2 replies
manelgavalda's avatar

Nova routes are defined in your NovaServiceProvider you can comment them out:

    /**
     * Register the Nova routes.
     *
     * @return void
     */
    protected function routes()
    {
        // Nova::routes()
        //         ->withAuthenticationRoutes()
        //         ->withPasswordResetRoutes()
        //         ->register();
    }
zelaza's avatar

Thanks for responding, but I believe what you're suggesting will disable all Nova routes except the API routes. In other words it will do exactly the opposite of what I want. I want to disable only the Nova API routes.

Please or to participate in this conversation.