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

Address register & GEOpunt API

Have you ever had to decide whether you should use Google maps, openstreetmaps, or another GIS provider for address suggestions? If you only need Belgian addresses, be sure to read on!

Author: Noah Gillard
PHP / Laravel Developer
Noah Gillard AI generated Face
Logo vlaamse overheid

Next.js: Just another framework?

About every 10 years, new technology emerges that brings about a change in the way we develop software. Is Next.js this new technology?

Author: Dries Cappon
UX, Design, React.js, Next.js
Dries Cappon
Next.js

Laravel 10 release

The release of Laravel 10: The king of types. Alles wat je moet weten over de nieuwe major release!

Author: Noah Gillard
PHP / Laravel Developer
Noah Gillard AI generated Face
laravel 10 banner

Saloon - Package / SDK API integrations

API integrations for a range of services. Little to no reusable code? With Saloon you turn it into a compact/clean SDK/Package that you can reuse in all your projects and maintain in one place.

Author: Noah Gillard
PHP / Laravel Developer
Noah Gillard AI generated Face
Saloon hero image

Codana wins Digital Champ of the year award 2022

Codana is the winner of the FeWeb Digital Champ award 2022! 

Author: Joris De Groot
Strategic Director and Managing Partner
Joris De Groot
FeWeb Digital Champ award Codana

Life as a React developer at Codana: 1 year in service

"You can start working with us as a React developer!". Bliss! Needless to say, I was super happy to hear this! But, I had never written a line of React before.

Author: Thomas Timmermans
Frontend Developer
Thomas Timmermans
Ik na 1 jaar in dienst