-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Hi,
I know this issue was addressed in different ways before, but I'm really having troubles and I don't know very much how to solve it.
My stack:
PHP 7.4.7
Laravel 7.20.0
Nova 3.6.0
The problem is when I try to use https://github.com/dcasia/conditional-container and https://github.com/dcasia/nova-json-wrapper at the same time.
For both packages, you have to use the traits to have everything working, but when they are used together, we have conflicts:
class CaseX extends Resource
{
use HasConditionalContainer, HasJsonWrapper;
...Then you get this error:

I know it happens because both traits have repeated methods, but I don't know how to exactly solve this issue.
I've been around checking some possible workarounds, and I found some related links, like:
- Method name collisions #4
- Can not work with json field conditional-container#21
- Trait method availableFields has not been applied, because there are collisions with other trait nova-mega-filter#37
- This package and conditional-container in the same class nova-mega-filter#47
I read the workarounds, but I didn't understand how to create them.
Could anyone with more experience help me to solve this issue?
Thanks!