kernel update, migration update

This commit is contained in:
Билай Станислав 2024-12-04 11:32:29 +03:00
parent 6c124e9bb7
commit 95a9b47fd5
5 changed files with 11 additions and 10 deletions

View File

@ -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=''

View File

@ -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" => "Слайдер",

View File

@ -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();
});

View File

@ -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" => "Опции",

View File

@ -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;
}