diff --git a/src/Controllers/BadasoTableController.php b/src/Controllers/BadasoTableController.php index 5f62001a..c3a40893 100644 --- a/src/Controllers/BadasoTableController.php +++ b/src/Controllers/BadasoTableController.php @@ -47,11 +47,10 @@ public function read(Request $request) $request->validate([ 'table' => 'required', ]); - $table = $request->table; $table_fields = SchemaManager::describeTable($table); + // $table_fields = Schema::getIndexes($table); - // dd($table_fields); $fields = []; foreach ($table_fields as $key => $column) { $column = collect($column)->toArray(); diff --git a/src/Database/Schema/SchemaManager.php b/src/Database/Schema/SchemaManager.php index 272ef15b..7a579015 100644 --- a/src/Database/Schema/SchemaManager.php +++ b/src/Database/Schema/SchemaManager.php @@ -20,7 +20,7 @@ public static function __callStatic($method, $args) public static function manager() { // return Schema::connection(); - // return DB::connection()->getDoctrineSchemaManager(); + return DB::connection()->getDoctrineSchemaManager(); } public static function getDatabaseConnection() @@ -76,7 +76,7 @@ public static function listTableDetails($table_name) */ public static function describeTable($table_name) { - Type::registerCustomPlatformTypes(); + // Type::registerCustomPlatformTypes(); $table = static::listTableDetails($table_name);