This package provides the ability to manager nova resources and tools, so you can enable and disable any resource or module. Disabling the resource or tool means that they will not be accessible anymore.
Install the package via composer using:
composer require yassir3wad/nova-moudles
then publish the ModulesSeeder to add your insert your resource and tools into the database.
php artisan vendor:publish --provider="Yassir3wad\NovaModules\ToolServiceProvider" --tag=seeds
- Add the tool into the tools array in your
NovaServiceProviderclass:
<?php
use Yassir3wad\NovaModules\NovaModules;
use Laravel\Nova\NovaApplicationServiceProvider;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
public function tools()
{
return [
NovaModules::make()
];
}
}- Call the
eliminateResourcesAndToolsfunction from theToolServiceProviderin the boot method in yourNovaServiceProvider
<?php
use Yassir3wad\NovaModules\ToolServiceProvider;
use Laravel\Nova\NovaApplicationServiceProvider;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
public function boot()
{
parent::boot();
ToolServiceProvider::eliminateResourcesAndTools();
}
}

