Skip to content

Commit

Permalink
Fixed issue #27 (TranslatableTabToRowTrait does not take an effect)
Browse files Browse the repository at this point in the history
  • Loading branch information
kongulov committed Nov 17, 2022
1 parent d6a54fc commit fb798c7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/TranslatableTabToRowTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait TranslatableTabToRowTrait

/**
* @param NovaRequest $request
* @return FieldCollection|\Illuminate\Support\Collection
* @return FieldCollection|Collection
*/
public function availableFields(NovaRequest $request)
{
Expand Down Expand Up @@ -47,8 +47,8 @@ public function availableFields(NovaRequest $request)
}
}


$availableFields = new FieldCollection(array_values($this->filter($availableFields)));

return $availableFields;
}

Expand Down Expand Up @@ -99,16 +99,15 @@ public function filterFieldsForRequest(Collection $availableFields, NovaRequest
*/
protected function doesRouteRequireChildFields(): bool
{

return Str::endsWith(Route::currentRouteAction(), [
/*'FieldDestroyController@handle',
'ResourceUpdateController@handle',
'ResourceStoreController@handle',
'AssociatableController@index',
'MorphableController@index',*/

'ResourceIndexController@handle',
'ResourceShowController@handle',
'ResourceIndexController',
'ResourceShowController',
]);
}

Expand Down

0 comments on commit fb798c7

Please sign in to comment.