From af2feb93f171aa686dca9423190b61e55751d272 Mon Sep 17 00:00:00 2001 From: Winfried Kappeler Date: Sat, 30 Mar 2024 15:47:16 +0100 Subject: [PATCH] V0.0.7 MenuitemWorxerSeeder - MenuitemWorxerSeeder.php --- CHANGELOG.md | 5 +++ composer.lock | 2 +- .../2024_03_29_084449_modify_users_table.php | 2 +- database/seeders/MenuitemWorxerSeeder.php | 38 +++++++++++++++++++ scripts/InitApp.sh | 3 +- 5 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 database/seeders/MenuitemWorxerSeeder.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a1b801..2a4d90b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# V0.0.7 MenuitemWorxerSeeder + +## Added +- MenuitemWorxerSeeder.php + # V0.0.6 InitApp.sh *modify_users_table.php InitApp.sh ## Changed diff --git a/composer.lock b/composer.lock index c3f6c0f..d4f0e75 100644 --- a/composer.lock +++ b/composer.lock @@ -1051,7 +1051,7 @@ "dist": { "type": "path", "url": "../laraknife", - "reference": "7ed4b7846c8bf3547bdecdf1435a21976d6df6a8" + "reference": "75f027bc39816f480246d553ef5b996fed7a775e" }, "require-dev": { "phpunit/phpunit": "11.0.x-dev" diff --git a/database/migrations/2024_03_29_084449_modify_users_table.php b/database/migrations/2024_03_29_084449_modify_users_table.php index 8d38835..4c858fc 100644 --- a/database/migrations/2024_03_29_084449_modify_users_table.php +++ b/database/migrations/2024_03_29_084449_modify_users_table.php @@ -11,7 +11,7 @@ return new class extends Migration */ public function up(): void { - if (8 < 7+9){ + if (1 > 7+9){ Schema::table('users', function(Blueprint $table) { $table->string('autologin', 129)->nullable(); $table->timestamp('endautologin'); diff --git a/database/seeders/MenuitemWorxerSeeder.php b/database/seeders/MenuitemWorxerSeeder.php new file mode 100644 index 0000000..d878dba --- /dev/null +++ b/database/seeders/MenuitemWorxerSeeder.php @@ -0,0 +1,38 @@ +insert([ + 'name' => 'words', + 'label' => 'Words', + 'icon' => 'bi bi-file-earmark-word', + 'section' => 'main', + 'link' => '/word-index' + ]); + DB::table('menuitems')->insert([ + 'name' => 'verbs', + 'label' => 'Verbs', + 'icon' => 'bi-chevron-double-right', + 'section' => 'main', + 'link' => '/verb-index' + ]); + DB::table('menuitems')->insert([ + 'name' => 'nouns', + 'label' => 'Nouns', + 'icon' => 'bi bi-file-image', + 'section' => 'main', + 'link' => '/noun-index' + ]); + } +} diff --git a/scripts/InitApp.sh b/scripts/InitApp.sh index 8bce034..90b3299 100755 --- a/scripts/InitApp.sh +++ b/scripts/InitApp.sh @@ -6,7 +6,7 @@ function Wait(){ } function SeedIt(){ for class in DatabaseSeeder ModuleSeeder SPropertySeeder RoleSeeder UserSeeder \ - MenuitemSeeder RoleWorxerSeeder FileSeeder NoteSeeder \ + MenuitemSeeder MenuitemWorxerSeeder RoleWorxerSeeder FileSeeder NoteSeeder \ WordSeeder NounSeeder; do sudo -u $DEV_USER ./artisan db:seed --class=$class done @@ -30,6 +30,7 @@ function DoIt(){ chown -R $DEV_USER:www-data bootstrap/cache sudo -u $DEV_USER composer update Wait + chown -R $DEV_USER storage/logs sudo -u $DEV_USER ./artisan migrate Wait SeedIt -- 2.39.5