直接上代码
use support\Db as SupportDb;
$columns = SupportDb::connection()->getDoctrineSchemaManager()
->introspectTable('pf_rc_admin_menu');;
dump($columns);
如果报以下错误:
laravel Class ‘Doctrine\DBAL\Driver\PDOMySql\Driver’ not found
需要安装一个库
composer require doctrine/dbal
RoveCoder版权所有,转载请注明