'2',// 类型[1=平台,2=商城] 'pid' => '36', 'title' => '售后数据', 'route' => 'mall/statistics/all-pay-type-refund', 'icon' => '', // 子菜单权限,此参数若为空则表示无需增加子菜单权限) 'authItemChild' => [] ] ]; $res = Menu::migrateCreateMenu($data); if ($res === false) throw new \Exception(Menu::getStaticError()); } catch (\Exception $e) { \Yii::error('迁移错误:' . $e->getMessage()); } } /** * {@inheritdoc} */ public function safeDown() { return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M241105024757CreateRefundStatisticsMenu cannot be reverted.\n"; return false; } */ }