소스 검색

创建统计模块

zqwang 1 년 전
부모
커밋
8d775da1ec
3개의 변경된 파일59개의 추가작업 그리고 0개의 파일을 삭제
  1. 32 0
      modules/Statistic/Installer.php
  2. 20 0
      modules/Statistic/Providers/StatisticServiceProvider.php
  3. 7 0
      modules/Statistic/routes/route.php

+ 32 - 0
modules/Statistic/Installer.php

@@ -0,0 +1,32 @@
+<?php
+
+namespace Modules\Tuiguang;
+
+use Catch\Support\Module\Installer as ModuleInstaller;
+use Modules\Statistic\Providers\StatisticServiceProvider;
+
+class Installer extends ModuleInstaller
+{
+    protected function info(): array
+    {
+        // TODO: Implement info() method.
+        return [
+            'title' => '统计管理',
+            'name' => 'statistic',
+            'path' => 'statistic',
+            'keywords' => '统计管理',
+            'description' => '统计管理模块',
+            'provider' => StatisticServiceProvider::class
+        ];
+    }
+
+    protected function requirePackages(): void
+    {
+        // TODO: Implement requirePackages() method.
+    }
+
+    protected function removePackages(): void
+    {
+        // TODO: Implement removePackages() method.
+    }
+}

+ 20 - 0
modules/Statistic/Providers/StatisticServiceProvider.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace Modules\Statistic\Providers;
+
+use Catch\CatchAdmin;
+use Catch\Providers\CatchModuleServiceProvider;
+
+class StatisticServiceProvider extends CatchModuleServiceProvider
+{
+    /**
+     * route path
+     *
+     * @return string
+     */
+    public function moduleName(): string
+    {
+        // TODO: Implement path() method.
+        return 'statistic';
+    }
+}

+ 7 - 0
modules/Statistic/routes/route.php

@@ -0,0 +1,7 @@
+<?php
+
+use Illuminate\Support\Facades\Route;
+
+Route::prefix('statistic')->group(function(){
+    //next
+});