How to add a custom clause to a subfield relationship with an accessor attribute in Backpack for Laravel Version 6?
I have a subfield relationship that I need to show using an accessor attribute: reverse_full_name. This works fine, but I need to add a scopeIsActive clause to limit the options for selection. When I add an options => function as shown in the code, I get MySQL error Unknown column ‘reverse_full_name’ in ‘field list’. If I add a DB::raw() to concatenate the names and alias it as reverse_full_name, the clause gets applied but the select options have the user id but a blank label.
How to add a custom clause to a subfield relationship with an accessor attribute in Backpack for Laravel Version 6?
I have a subfield relationship that I need to show using an accessor attribute: reverse_full_name. This works fine, but I need to add a scopeIsActive clause to limit the options for selection. When I add an options => function as shown in the code, I get MySQL error Unknown column ‘reverse_full_name’ in ‘field list’. If I add a DB::raw() to concatenate the names and alias it as reverse_full_name, the clause gets applied but the select options have the user id but a blank label.