How to create custom page and show it in menu in Laravel Nova?

Stefan Bogdanescu

Founder & Senior Architect · 2026-06-29

Laravel Company

How to Create Custom Pages and Show Them in the Menu in Laravel Nova

When building complex admin interfaces with Laravel Nova, developers often need to present data that doesn't neatly fit into a standard Eloquent Model setup. For instance, displaying application-wide settings sourced from configuration files is a common requirement. This guide walks you through the developer-centric approach to creating a custom page in Nova and integrating it seamlessly into your navigation menu, even when bypassing the typical model-based resource creation process.

The Challenge: Custom Pages Without Models

Laravel Nova is fundamentally designed around Eloquent Models, treating each model as a distinct "Resource." When you create a standard resource, Nova automatically handles routing, permissions, and menu placement based on that model. Your requirement—creating a page based purely on data from app/config/some_config.php without an associated database model—requires a slightly more manual approach to register this view within the Nova ecosystem.

The core challenge is how to tell Nova, "This view exists, and it should be clickable in the sidebar," without relying on a Model instance for management.

Solution: Registering Custom Pages via Controllers or Views

Since we are avoiding a formal model structure for this specific piece of data, we will treat this as a custom navigational item rather than a full CRUD resource. The most robust way to achieve this is by leveraging Nova's ability to register custom pages, often through custom controllers or dedicated page classes.

Step 1: Define the Custom Page Logic

First, you need a dedicated controller or class that handles the logic for rendering this configuration view. This separation keeps your concerns clean, which aligns with best practices in Laravel development, much like the principles discussed on laravelcompany.com.

Let's assume we want to display settings from app/config/some_config.php. You can create a dedicated controller:

// app/Nova/CustomSettingsController.php

namespace App\Nova;

use Illuminate\Support\Facades\Config;
use Laravel\Nova\Controller;

class CustomSettingsController extends Controller
{
    public function index()
    {
        // Access configuration data directly
        $settings = Config::get('some_config');

        // Return a view or JSON response suitable for Nova display
        return response()->json([
            'title' => 'Application Settings',
            'data' => $settings,
        ]);
    }
}

Step 2: Registering the Page with Nova

Next, you need to map this controller route within Nova. This is typically done by registering it in your Nova Service Provider or directly configuring the Nova menu structure. Since we are creating a standalone page, we register it as a navigable item.

The key to showing it in the menu is defining its group. When setting up your Nova configuration (often in config/nova.php or through Nova's administrative settings), you define the hierarchy. You would typically place this custom page within an existing logical grouping, ensuring it appears where users expect application settings to be found.

For example, if you have a 'Settings' group:

// Conceptual setup within your Nova configuration or registration logic
Nova::registerClass(CustomSettingsController::class);

// Registering the navigation item within a group
Nova::menu(
    'Application Settings', // The visible link text
    'custom_settings',     // The route/name associated with the controller method
    config('nova.groups.settings') // Placing it under the 'settings' group
);

Best Practices for Nova Customization

When extending Nova functionality, remember that while you are avoiding a full Eloquent model, you are still operating within the Laravel framework structure. Always aim to keep your custom logic decoupled from the core resource management if possible. This modularity makes future maintenance easier, which is crucial when working with large applications built on robust frameworks like Laravel.

By following this pattern—creating a dedicated controller to serve configuration data and then registering that route/view within Nova's menu structure—you successfully create custom pages that appear in the admin panel without forcing an unnecessary database model relationship. This approach provides flexibility while maintaining the clean, structured interface that Laravel Nova is known for.


Conclusion:

Creating custom, configuration-driven pages in Laravel Nova requires stepping outside the standard Eloquent resource paradigm and leveraging Nova's route and menu registration capabilities. By defining a dedicated controller to fetch data from your configuration files and then explicitly registering this endpoint within a logical group, you achieve a clean, navigable experience for your administrators. This method ensures that your custom views are integrated into the admin panel effectively, demonstrating how flexible the Laravel ecosystem is when building tailored interfaces.