We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2111850 commit dfe3b8fCopy full SHA for dfe3b8f
src/Generators/NovaResourceGenerator.php
@@ -137,8 +137,10 @@ protected function getFieldsFromCommandLineArguments(): array
137
protected function getFieldsFromDatabase(): array
138
{
139
$modelClass = "App\Models\{$this->model}";
140
- $tableName = app($modelClass)->getTable();
141
- $columns = DB::getDoctrineSchemaManager($tableName);
+ $model = app($modelClass);
+ $columns = DB::connection($model->getConnectionName())
142
+ ->getDoctrineSchemaManager()
143
+ ->listTableColumns($model->getTable());
144
145
$fields = array_map(function ($column) {
146
return new DatabaseNovaField($column);
0 commit comments