Skip to content

Commit

Permalink
Other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
miguilimzero committed Aug 6, 2023
1 parent 0c15a50 commit 0a0911b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Generators/TableGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ protected function getResourceTableSchemaColumns(string $model): array

if (Str::of($columnName)->contains(['link', 'url'])) {
$columnData['url'] = [fn($record) => $record->{$columnName}];
$columnData['color'] = 'primary';
$columnData['openUrlInNewTab'] = [];
}
}
Expand Down Expand Up @@ -203,7 +204,7 @@ protected function bindRelatedResourceToRelationship(TextColumn $column): TextCo
return null;
}

return $selectedResource::getUrl($view, $relatedRecord->getKey());
return $selectedResource::getUrl($view, [$relatedRecord->getKey()]);
})->color('primary');
}
}
2 changes: 1 addition & 1 deletion stubs/AutoResource.stub
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class {{ resourceClass }} extends AutoResource
{
protected static ?string $model = {{ modelClass }}::class;

protected static ?string $navigationIcon = 'heroicon-o-collection';
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static array $enumDictionary = [];

Expand Down

0 comments on commit 0a0911b

Please sign in to comment.