Skip to content

Commit

Permalink
trying fix schema class
Browse files Browse the repository at this point in the history
  • Loading branch information
miftahurrahmi committed Jun 3, 2024
1 parent 0503b9d commit c2a8218
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Controllers/BadasoTableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Schema/SchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit c2a8218

Please sign in to comment.