Giter Site home page Giter Site logo

Comments (4)

authanram avatar authanram commented on May 11, 2024 2

Remove (or just do not use) shipped navigation entirely:

  1. Do not add the NovaPermissionTool to your NovaServiceProvider
    (Perform it carefully, to not damage something ;-))
    Expectation: no group/element(s) will be added to the navigation

  2. Create your own Permission and Role resource, like the following:
    Expectation: full control - add Role and Permission any place you <3 at the navigation

// in app/Nova/Permission.php (App\Nova\Role looks quite similar)

namespace App\Nova;

use Illuminate\Http\Request;
use Vyuldashev\NovaPermission\Permission as NovaPermission;

class Permission extends NovaPermission
{
    // this is set to `false` by parent
    // so this is mandatory to make it visible
    public static $displayInNavigation = true;

    // add it to the place (group) you <3
    public static $group = 'Some Group';

    public function fields(Request $request)
    {
        //
    }

    // ...
}

Hope this helps.

But anyway... i agree with @himan72. (A 🌮 for u buddy... as long we wait for the config file solution)

👍 to your package. I use it since the first day i use nova. ❤️ ❤️ It's pretty helpful.

from nova-permission.

himan72 avatar himan72 commented on May 11, 2024

yes will be nice if we can have a config file

from nova-permission.

vyuldashev avatar vyuldashev commented on May 11, 2024

You can now customize your permission and role resource classes. https://github.com/vyuldashev/nova-permission#customization

If you want to add cards, filters, etc you can extend this package role/permission resources and change what you need.

from nova-permission.

vyuldashev avatar vyuldashev commented on May 11, 2024

@authanram I guess your solution is better than the one with config. Extend and make any changes you wish.

from nova-permission.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.