Open Senexis opened 5 years ago
Really would like something like this as well. I want to customize some code for a super admin, but this is currently impossible. Would be nice if we could inject the resource into the boot method:
/**
Thanks for the feedback. Sounds like a sensible suggestion but instead of the useDefaultResource
config it might be better to just specify the fully name spaced class to be used there. Will try and get to this as soon as I can but if anyone else wants to open a PR that would be appreciated too.
First off, this issue is related to #24 in that I wish to be able to override the default Nova resource injected via
NovaToolPermissions.php
. This shouldn't need any publishing, however, as per the way class extending works. I currently did this in my local project by doing something like this:Now, this works fine for my use case, which is a relatively small application. I have not tested this on larger applications, but I imagine that due to this logic being in the
boot()
method, it doesn't impact the performance of Nova in any meaningful way.This allows me to then extend the base role resource and extend it to my heart's content in
/app/nova/
much like the following. Special shout-out to issue #30 here. šI would like to propose this being implemented in a similar form in the production tool, as it very simply allows any customization or overrides without having to constantly rely on, well, you guys. š
Thank you for maybe considering this. I would much appreciate it.