File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -136,9 +136,11 @@ protected function getFieldsFromCommandLineArguments(): array
136136
137137 protected function getFieldsFromDatabase (): array
138138 {
139- $ modelClass = "App\Models\{ $ this ->model } " ;
140- $ tableName = app ($ modelClass )->getTable ();
141- $ columns = DB ::getDoctrineSchemaManager ($ tableName );
139+ $ modelClass = "App \\Models \\{$ this ->model }" ;
140+ $ model = app ($ modelClass );
141+ $ columns = DB ::connection ($ model ->getConnectionName ())
142+ ->getDoctrineSchemaManager ()
143+ ->listTableColumns ($ model ->getTable ());
142144
143145 $ fields = array_map (function ($ column ) {
144146 return new DatabaseNovaField ($ column );
@@ -151,4 +153,4 @@ protected function commandFieldsExists(): bool
151153 {
152154 return !empty (Arr::flatten ($ this ->fields ));
153155 }
154- }
156+ }
You can’t perform that action at this time.
0 commit comments