Posts Learn Components Snippets Categories Tags Tools new About
/

How to Group Resource in Laravel Nova

Learn how to group resource in the sidebar of Laravel Nova to better categories each of the resource section.

Created on Sep 04, 2021

431 views

To group a resource, you can specify the static "$group" property available to each Nova Resource.

Laravel Nova Group Pages


For example, if you want to group a "Pages" Nova resource then you can write it as follows.
/**
 * The logical group associated with the resource.
 *
 * @var string
 */
public static $group = 'Pages';

Laravel Nova Group Category


To group a resource that contains a category and as such, you can name it as "Category".
/**
 * The logical group associated with the resource.
 *
 * @var string
 */
public static $group = 'Category';

Nova Resource Grouping Preview


Laravel Nova Resource Grouping

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

Load comments for How to Group Resource in Laravel Nova

)