1、引用 use Illuminate\Support\Facades\Schema;
2、$tables = Schema::getConnection()->getDoctrineSchemaManager()->listTableNames();
3、$columns = Schema::getConnection()->getDoctrineSchemaManager()->listTableColumns('表名‘);
4、获取表的注释:
foreach ($columns as $column) {
$comment = $column->getComment();
}
网友评论