File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,22 @@ class GenerateTypeScriptInterfaceFromModel extends Command {
2424 */
2525 protected $ description = 'Generate a TypeScript interface from a model ' ;
2626
27+ /**
28+ * The supported database connections.
29+ *
30+ * @var array
31+ */
32+ private const SUPPORTED_DATABASE_CONNECTIONS = [
33+ 'mysql ' ,
34+ ];
35+
2736 /**
2837 * Check if the current database connection type is supported.
2938 *
3039 * @return bool
3140 */
3241 private function hasSupportedDatabaseConnection (): bool {
33- return collect ([ ' mysql ' ] )->contains (DB ::getDefaultConnection ());
42+ return collect (self :: SUPPORTED_DATABASE_CONNECTIONS )->contains (DB ::getDefaultConnection ());
3443 }
3544
3645 /**
@@ -147,7 +156,8 @@ public function handle(): int {
147156 }
148157
149158 if (!$ this ->hasSupportedDatabaseConnection ()) {
150- $ this ->error ('We currently only support a MySQL connection! ' );
159+ $ this ->error ('Your database connection is currently unsupported! ' );
160+ $ this ->info ('The following database connections are supported: ' . collect (self ::SUPPORTED_DATABASE_CONNECTIONS )->join (', ' ));
151161
152162 return Command::FAILURE ;
153163 }
You can’t perform that action at this time.
0 commit comments