Skip to content

yassir3wad/nova-modules

Repository files navigation

Laravel Nova Modules

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.

Installation

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

Usage

  1. Add the tool into the tools array in your NovaServiceProvider class:
<?php
use Yassir3wad\NovaModules\NovaModules;
use Laravel\Nova\NovaApplicationServiceProvider;

class NovaServiceProvider extends NovaApplicationServiceProvider
{
      public function tools()
       {
           return [
               NovaModules::make()
                ];
        }
}
  1. Call the eliminateResourcesAndTools function from the ToolServiceProvider in the boot method in your NovaServiceProvider
<?php
use Yassir3wad\NovaModules\ToolServiceProvider;
use Laravel\Nova\NovaApplicationServiceProvider;

class NovaServiceProvider extends NovaApplicationServiceProvider
{
    public function boot()
    {
        parent::boot();
        ToolServiceProvider::eliminateResourcesAndTools();
    }
}

Screenshots

Modules List Modules List

Change Modules Status (active-inactive) Modules List

Then Nova looks like Modules List

About

A nova tool to manager nova resources and tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published