File tree 1 file changed +3
-3
lines changed
src/Http/Resources/Contracts
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -51,18 +51,18 @@ protected function onlyAllowed($request): array
51
51
return in_array (Helpers::camel ($ key ), $ fields );
52
52
}, ARRAY_FILTER_USE_KEY );
53
53
54
- return $ this ->mapRelatedResources ($ resources );
54
+ return $ this ->mapRelatedResources ($ resources, $ request );
55
55
}
56
56
57
- protected function mapRelatedResources ($ resources )
57
+ protected function mapRelatedResources ($ resources, $ request )
58
58
{
59
59
if (empty (static ::$ mapResources )) {
60
60
return $ resources ;
61
61
}
62
62
63
63
foreach ($ resources as $ key => $ value ) {
64
64
if (array_key_exists ($ key , static ::$ mapResources )) {
65
- $ resources [$ key ] = static ::$ mapResources [$ key ]::make ($ this ->{Helpers::camel ($ key )});
65
+ $ resources [$ key ] = static ::$ mapResources [$ key ]::make ($ this ->{Helpers::camel ($ key )})-> toArray () ;
66
66
}
67
67
}
68
68
You can’t perform that action at this time.
0 commit comments