feat(produce): 完善统计、菜单与扫码搜索
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
if (!$schema->hasTable('sys_menu')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$icons = [
|
||||
'article' => 'ant-design:read-outlined',
|
||||
'article:index' => 'ant-design:file-text-outlined',
|
||||
'article:category:index' => 'ant-design:folder-open-outlined',
|
||||
'article:tag:index' => 'ant-design:tags-outlined',
|
||||
'article:recycle:index' => 'ant-design:delete-outlined',
|
||||
];
|
||||
foreach ($icons as $code => $icon) {
|
||||
$schema->getConnection()->table('sys_menu')->where('app', 'article')->where('code', $code)->update([
|
||||
'icon' => $icon,
|
||||
'updated_at' => time(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user