Bezhan
Weird override behavior
The reason some method overrides work while others don’t is due to how they are scoped and utilized. For example, model label and model plural label overrides do not work because you’re only overriding the
RoleResource
. To make those overrides work, you also need to extend the ListRoles
page of the resource and bind your custom implementation in a service provider, just like you did with the resource.
The same applies to sub-navigation. To get sub-navigation working, you need to extend both the EditRole
and ViewRole
pages of the RoleResource
with your custom implementation of those pages. Once you’ve done that, bind them in a service provider. Then, within your custom RoleResource
(ShieldOverrideResource
) implementation, override the getPages()
method to provide your implementation for those pages, and implement getRecordSubNavigation()
accordingly.3 replies
multitenacy combined with tenancyforlaravel and filament shield permission problem
1. To disable cache in dev mode set the
CACHE_DRIVER=array
in .env file or set the cache store to array from permission config file. learn more https://spatie.be/docs/laravel-permission/v5/advanced-usage/cache
2. since you are using that package you need to add the following in TenancyServiceProvider
learn more https://tenancyforlaravel.com/docs/v3/integrations/spatie14 replies
Dynamic text input value
dude your doing it in reverse.. it should be
afterStateUpdate()
but you need to change the state from year
and/or name
to trigger the state change. fields can't listen to other fields' state changes only there own but you can change a field's state from another field.7 replies