79835833

Date: 2025-12-02 12:00:10
Score: 2
Natty:
Report link

Short version: Nova isn’t broken, it’s just opinionated as hell. What you’re trying to do is outside what the stock dashboard API was built for.

Here’s the reality:

  1. 5 cards in a row
    Nova cards use fixed width helpers like ->width('1/3'), ->width('1/2'), ->width('full') etc. It’s basically a 12-column grid, so you can’t cleanly get 5 equal cards per row out of the box. You only control those width fractions, not the grid definition itself.

    If you really want 5 per row, the only options are:

    • Override Nova’s dashboard CSS (hacky, global), or

    • Put your own layout inside a single custom card and ignore Nova’s grid.

  2. “Group with a title” / container for metrics
    Nova doesn’t ship any “metric group” or “card section” primitive. A “group” is just… another card. Official way to do this is a custom card where you render whatever HTML/layout you want (title + 5 child blocks, charts, whatever).

    There are community packages like nova-dashboard / nova-databoards that do richer layouts, but under the hood it’s still custom cards and tools.

  3. Custom layout for one metric
    Same story: built-in metrics (value/trend/partition/progress) have fixed UIs. If you need a different visual, Nova expects you to build a card, not bend the metric classes into a new layout.

  4. “Can I do this without a nova component / JSON package?”
    Not really in a clean way. The Blade approach you tried fails because the dashboard is rendered via Nova’s Vue/Inertia stack, not your app’s Blade views, so your own Blade template never gets called there.

    What you can do, if you hate the “composer package” noise, is:

    • Run php artisan nova:card vendor/temp-layout once.

    • Move the generated Vue/JS files into your app’s resources/js and register the card locally (there’s a known pattern for “un-packaging” cards so they live inside the app instead of a reusable package).

    • Delete the nova-components/vendor/temp-layout directory and its extra composer.json when you’re done.

    Functionally it’s still a custom card, but removal is literally “delete this folder and one registration line”.


So blunt answer to your main question:

is there a way to add one simple layout without creating a whole new nova component?

No “secret Blade hook,” no built-in grouping, no 5-per-row config. For anything beyond what metrics already give you, Nova’s official path is a custom card (or tool). If this is temporary, make one small card, keep it local, and rip it out later. Trying to fight around that will cost you more time than just giving in and making the card.

Reasons:
  • Blacklisted phrase (1): Can I do
  • Blacklisted phrase (1): is there a way
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Fazle Ryan