Custom admin dashboards

Nova 4 Dashboard Codana Styled

Laravel Nova is a tool to make admin panel development a lot easier. It's definitely not a generator, it's doesn't generate files. It's even not a CMS, a lot of functions that you could expect from a CMS won't be available out-of-the-box, but it's more focused on developers. The best way to describe Nova is like an admin panel tool that makes it easier to make a well styled UI for the backoffice of your product.

Laravel Nova 3.0 vs 4.0

Laravel Nova 3.0 had a lot of useful functionalities:

  • a dozen of premade fields
  • a global search
  • CRUD integration
  • Lenses 
  • Actions
  • ...

But there were also some pains that came from the community. In 4.0 the Nova developers showed that they actually listen and that they want Nova to grow in the direction of that community's use cases.

Custom admin panel?

Contact us so we can make a strong plan together.

Packages/features

Dependent Fields

A good example is the use of dependent fields. The possibility to put your fields in an imaginary container that depends on values of another field.

Until now the only option was to use a package (epartment /nova-dependency-container), it suited everyone's needs and worked perfectly (with even 2.5M downloads on Packagist).

This functionality has now been integrated in the core of Laravel Nova 4.0, so from now on you wouldn't need to depend on the maintenance of a third party package.

Select::make('Purchase Type', 'type')
    ->options([
        'personal' => 'Personal',
        'gift' => 'Gift',
    ]),

// Recipient field configuration is customized based on purchase type...
Text::make('Recipient')
    ->readonly()
    ->dependsOn(
        ['type'],
        function (Text $field, NovaRequest $request, FormData $formData) {
            if ($formData->type === 'gift') {
                $field->readonly(false)->rules(['required', 'email']);
            }
        }
    ),

 

Impersonate menu

Impersonation

Impersonating a user is especially useful for an administrator to be able to approach the interface from the point of view of a certain user. A package that was used a lot for this was KABBOUCHI/nova-impersonate. From Nova 4.0 this will also be an integrated functionality that will be included in the core of Nova. Another dependency that was removed 👌

Mobile Friendly Dark Mode Nova 4

Responsive Design

Nova 4.0 introduces a thoroughly redesigned user interface that is now fully responsive, so you can use your platform on your phone on the go.

Also one of the most requested styling features was implemented: "dark mode"!

Branding Nova 4 Codana Styled

Painless Branding

A new branding option has been added to the Nova configuration so that you can easily customize the "primary colors" and logo used in the Nova interface without having to create a custom Nova "theme".

Laravel Nova 4 Codana Styled Sidebar

Custom Menus

There is now also support for a fully customizable sidebar and user menu. In fact, you can fully customize every item in Nova's navigation (left sidebar), including creating menu sections, menu groups, and more. Previously, this also required a package to be able to do this, such as digital-creative/collapsible-resource-manager.

Upgrades

Laravel-mix

Laravel Nova has been around for a long time and Laravel Mix was never updated in that time, so there is now a big catch-up from v1 to v6.

Tailwind 3

In Nova 3.0 Tailwind CSS 0.6.0 is still used, here too there will be an upgrade: Tailwind CSS 3!

Inertia.JS

Inertia implements a new approach to building classic server-driven web apps. Inertia makes it possible to create fully client-side rendered, single page apps without the complexity that usually comes with modern SPAs. It does this by leveraging existing server-side frameworks. Inertia has no client-side routing, nor does it require an API. Easily build controllers and page views like you always have!

Not a framework

Inertia is not a framework, nor is it a replacement for your existing server- or client-side framework. Rather, it is designed to work with them. Think of Inertia as glue that connects the two. Inertia does this via adapters. There are currently three official client-side adapters (React, Vue, and Svelte) and two server-side adapters (Laravel and Rails).

Example in Nova 4.0

You will especially notice the use of Inertia.js if you're going to make custom tools that use the Vue router. Nova has therefore replaced the Vue router with Inertia.js. As a result, when you upgrade to 4.0 and higher, you will have to migrate custom tools from Vue routes to registering Inertia page components and backend routes.

As an example we have a Nova 3 Vue router registration:

// In tool.js...

Nova.booting((Vue, router) => {
  router.addRoutes([
    {
      name: 'sidebar-tool',
      path: '/sidebar-tool',
      component: require('./components/Tool'),
    },
  ])
})

When we upgrade to Nova 4, you will need to register the tool components as follows:

// In tool.js...

Nova.booting((Vue) => {
  Nova.inertia('SidebarTool', require('./component/Tool').default)
})

Once your Vue component is registered, you will need to define a server-side route for your tool to render your component:

// In ToolServiceProvider.php...

use Laravel\Nova\Nova;

Nova::router()
    ->group(function ($router) {
        $router->get('sidebar-tool', function ($request) {
            return inertia('SidebarTool');
        });
    });

 

Author: Noah Gillard
PHP / Laravel Developer
Noah Gillard AI generated Face

More insights

Laracon EU 2024

A fantastic learning experience to inspire and be inspired together with a lot of other Laravel passionate people! Something we couldn't miss and very much connect with the community. What a top event! Who will we see next editions? 😮

Author: Noah Gillard
PHP / Laravel Developer
Noah Gillard AI generated Face
laracon codana persoon

An efficient tourism data management system

A TDMS or Tourist Data Management System, is simply a platform that retrieves data from various sources, processes it internally either automatically or not, and offers this data back to external platforms.

Author: Tom Van den Eynden
Web Architect | Coordinator
Tom Van den Eynden
laptop

Tourism Data Management Systems

In dit artikel verkennen we wat een TDMS is, waarom het essentieel is voor de toerisme-industrie, en hoe technologieën zoals Laravel en ElasticSearch het verschil kunnen maken. 

Author: Tom Van den Eynden
Web Architect | Coordinator
Tom Van den Eynden
tdms

The difference between data management and data processing in a digital economy

Gegevens zijn cruciaal voor bedrijven en het begrijpen van de verschillen tussen gegevensbeheer en gegevensverwerking kan verwarrend zijn. In dit artikel zullen we deze verschillen in de digitale economie nader bekijken om hun doelen en toepassingen beter te begrijpen.

Author: Tom Van den Eynden
Web Architect | Coordinator
Tom Van den Eynden
gegevensverwerking

Test Driven Development - application to a project

TDD, or in full Test Driven Development, is an approach to development where we start from writing tests.

Author: Sarah Jehin
PHP developer
Sarah Jehin
development

Securing Laravel 101

In this blog post, we're gonna take a closer look at some common Laravel security mistakes.

Author: Robbe Reygel
PHP developer
laravel