How can I change the Label of Permission (Shield)
Hello, I am using the Filament Shield plugin, if I create 2 Resources in 1 Model, how can I change the Label of Permission?
Example: Ticket (Request for quotation), Ticket (Web Maintenance)
7 Replies
iirc the permission label uses resource label, you can try changing yours or more info ask here #bezhansalleh-shield
Hi, Have you got any solutions for this? so please share.
I create 2 Model for 2 Resources
use App\Models\Ticket;
class ModelNameOne extends Ticket
{
protected $table = 'tickets';
}
class ModelNameTwo extends Ticket
{
protected $table = 'tickets';
}
You can try to (re)name your second resource like this:
Thank you both for your help.
My permission label has been updated, but I'm encountering an issue: when I disable any permission for Disabled Products, the permissions for Enabled Products also change.
I'll try your suggestion to create two models for the two resources, similar to how Ticket works.
Can I able to remove model path as well ?
Fixed mine by publishing the config
The you can turn feature on and off in filament-shield.php file
Solution
Thanks for your reply.