diff --git a/.env.example b/.env.example index ac75a63..64e043c 100644 --- a/.env.example +++ b/.env.example @@ -1,16 +1,16 @@ DB_HOST=localhost -DB_USER=root +DB_USER=user DB_DRIVER=mysql -DB_PASSWORD=123edsaqw -DB_NAME=mfw -DB_CHARSET=utf8 -DB_COLLATION=utf8_unicode_ci +DB_PASSWORD=password +DB_NAME=name +DB_CHARSET=utf8mb4 +DB_COLLATION=utf8mb4_unicode_ci DB_PREFIX='' VIEWS_PATH=/views VIEWS_CACHE_PATH=/views_cache -MODULE_SHOP_URL='http://localhost:8383/api' -MODULE_SHOP_TOKEN='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.W10.Sisyc1bgy03TI0wT11oKhgh5J6vR9XWDOV56L6BiTJY' +MODULE_SHOP_URL='http://igfs.loc' +MODULE_SHOP_TOKEN='your token' SECRET_KEY='' \ No newline at end of file diff --git a/app/modules/slider/SliderModule.php b/app/modules/slider/SliderModule.php index 41839b5..7f7db1f 100644 --- a/app/modules/slider/SliderModule.php +++ b/app/modules/slider/SliderModule.php @@ -22,7 +22,7 @@ class SliderModule extends Module */ public function init(): void { - $this->migrationService->runAtPath("{KERNEL_APP_MODULES}/slider/migrations"); + $this->migrationService->runAtPath("{APP}/modules/slider/migrations"); $this->menuService->createItem([ "label" => "Слайдер", diff --git a/app/modules/slider/migrations/2024_12_03_124749_create_slider_table.php b/app/modules/slider/migrations/2024_12_03_124749_create_slider_table.php index 0761ec2..a8471d0 100644 --- a/app/modules/slider/migrations/2024_12_03_124749_create_slider_table.php +++ b/app/modules/slider/migrations/2024_12_03_124749_create_slider_table.php @@ -16,6 +16,7 @@ return new class extends Migration $table->string('title', 255)->nullable(false); $table->string('additional_information', 255)->nullable(false); $table->string('content', 255)->nullable(false); + $table->string('link', 255)->nullable(false); $table->integer('status')->default(0); $table->timestamps(); }); diff --git a/kernel/console/controllers/AdminConsoleController.php b/kernel/console/controllers/AdminConsoleController.php index b94b994..bce72d6 100644 --- a/kernel/console/controllers/AdminConsoleController.php +++ b/kernel/console/controllers/AdminConsoleController.php @@ -136,7 +136,7 @@ class AdminConsoleController extends ConsoleController "slug" => "menu", "parent_slug" => "settings" ]); - $this->out->r("create item menu admin-themes", "green"); + $this->out->r("create item menu menu", "green"); $this->menuService->createItem([ "label" => "Опции", diff --git a/kernel/services/ModuleService.php b/kernel/services/ModuleService.php index 6a8b01c..c112e2f 100644 --- a/kernel/services/ModuleService.php +++ b/kernel/services/ModuleService.php @@ -113,7 +113,7 @@ class ModuleService if (isset($module_info['dependence'])) { $dependence_array = explode(',', $module_info['dependence']); foreach ($dependence_array as $depend) { - if (!in_array($depend, $active_modules->modules)) { + if (!in_array(trim($depend), $active_modules->modules)) { $this->addError("first activate the $depend module"); return false; }