2Hats . 3 minutes
October 23, 2023

Exploring Laravel Nova: The Ultimate Guide for your PHP Admin Panel Development Needs.

Nova is an admin panel for Laravel applications. It can be installed on existing websites to manage the data in the database. It can be used with existing projects and the current code doesn’t get touched. It can be installed as a composer package. It’s essentially a single-page Vue application that also uses Tailwind CSS. There are JSON APIs that fetch the data from the database.

When you install Nova, it creates a new app/Nova folder. Each model in your app will have a corresponding Nova resource. For example, there will be an app/Nova/User.php file that acts as the Nova resource for the User model. There will be a user tab where you can see all the users.

Each Nova resource (like app/Nova/User.php) contains a fields method that defines the fields that gets displayed in the Nova admin panel for that particular resource. Its flexible and easy to customize with code like below:

Configuration is done using PHP classes instead of storing in the DB.

It ships with a handful of cool features like:

  • Resource Management –  The data associated with models and its relations can be easily managed. All Eloquent relationships are supported.
  • Actions  – Simple PHP classes that can be used to perform actions on a resource or a group of resources. For example, you can define an action that deactivates a group of users. This action can be easily triggered by the dashboard.
  • Search – Nova makes it easy to do searches on MySQL queries as well as Scout searches. This means that integrating with something like Algolia is a breeze.
  • Filters – Filters are available on the index pages for each resource. A soft delete filter is included by default so you can view and manage trashed items.
  • Lenses – Lenses are essentially advanced filters. Suppose you wish to add a Lens for Most Valuable Users in the user’s index page. You create a Lense class that has a query that sorts the users by the revenue. You can add this to the dashboard so that when the user clicks a ‘Most Valuable Users’ button or link, it will execute the query in the Lense class and display the results.
  • Metrics – Easily generate charts. There are some options by default but it’s highly customizable and easy to implement.
  • Authorization – Built over existing Laravel authentication system. Authorization is also available for relationships, tools, actions, lenses, and fields.

Below is what the Nova admin panel looks like. Note that it’s just the default display, everything can be customized. Brand colors, logos etc can be easily changed to fit your business needs.

If you are looking to quickly fire up a slick admin panel for your website, Nova is a great choice. If you require any expert advice regarding Laravel development services, need to hire a Laravel developer, or seek guidance on choosing the right platform and other eCommerce services, feel free to contact us.

blog
Greetings! I'm Aneesh Sreedharan, CEO of 2Hats Logic Solutions. At 2Hats Logic Solutions, we are dedicated to providing technical expertise and resolving your concerns in the world of technology. Our blog page serves as a resource where we share insights and experiences, offering valuable perspectives on your queries.
Aneesh ceo
Aneesh Sreedharan
Founder & CEO, 2Hats Logic Solutions
Subscribe to our Newsletter
Arsha Contact

    Stay In The Loop!

    Subscribe to our newsletter and learn about the latest digital trends.