PHP code example of saintsystems / nova-resource-group-menu
1. Go to this page and download the library: Download saintsystems/nova-resource-group-menu library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
saintsystems / nova-resource-group-menu example snippets
// in your app/Nova/Resource.php class
use SaintSystems\Nova\ResourceGroupMenu\DisplaysInResourceGroupMenu;
abstract class Resource extends NovaResource
{
use DisplaysInResourceGroupMenu;
//... Removed for brevity
}
// in your Nova Resource classes
public static $displayInNavigation = false;
// in your Nova Resource classes
public static $group = 'Master Data';
// in your Nova Resource classes
public static $subGroup = 'Vendors';
use SaintSystems\Nova\ResourceGroupMenu\ResourceGroupMenu;
/**
* Get the tools that should be listed in the Nova sidebar.
*
* @return array
*/
public function tools()
{
return [
new ResourceGroupMenu
];
}
/**
* Get the tools that should be listed in the Nova sidebar.
*
* @return array
*/
public function tools()
{
return [
(new ResourceGroupMenu)->width('1/4'),
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.