Skip to content

Instantly share code, notes, and snippets.

@fridzema
Created June 4, 2020 11:06
Show Gist options
  • Save fridzema/4b267c9e7b829675b290fcc2d2ab31bd to your computer and use it in GitHub Desktop.
Save fridzema/4b267c9e7b829675b290fcc2d2ab31bd to your computer and use it in GitHub Desktop.
$schema = collect(DB::connection()->getDoctrineSchemaManager()->listTableNames())->map(function ($item, $key) {
return [
'name' => $item,
'colomns' => DB::getSchemaBuilder()->getColumnListing($item)
];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment