]> gitweb.hamatoma.de Git - worxer.git/commitdiff
V0.0.7 MenuitemWorxerSeeder
authorWinfried Kappeler <winfried.kappeler@infeos.eu>
Sat, 30 Mar 2024 14:47:16 +0000 (15:47 +0100)
committerWinfried Kappeler <winfried.kappeler@infeos.eu>
Sat, 30 Mar 2024 14:47:16 +0000 (15:47 +0100)
- MenuitemWorxerSeeder.php

CHANGELOG.md
composer.lock
database/migrations/2024_03_29_084449_modify_users_table.php
database/seeders/MenuitemWorxerSeeder.php [new file with mode: 0644]
scripts/InitApp.sh

index 5a1b8014fc63de14fdaae3cc70b662e716a381be..2a4d90bbb2a266522b98f6d9e0a079e9bd125285 100644 (file)
@@ -1,3 +1,8 @@
+# V0.0.7 MenuitemWorxerSeeder
+
+## Added
+- MenuitemWorxerSeeder.php
+
 # V0.0.6 InitApp.sh *modify_users_table.php InitApp.sh
 
 ## Changed
index c3f6c0f46beb96d2c18f76ed93152645f1cbf95e..d4f0e75479b428680f9503dea513c9a9eeb55446 100644 (file)
             "dist": {
                 "type": "path",
                 "url": "../laraknife",
-                "reference": "7ed4b7846c8bf3547bdecdf1435a21976d6df6a8"
+                "reference": "75f027bc39816f480246d553ef5b996fed7a775e"
             },
             "require-dev": {
                 "phpunit/phpunit": "11.0.x-dev"
index 8d3883535725f76d55b5ec4410ed5a1eae835d2b..4c858fc3bb56e08de3b09c5dd4370e36d1c2ad69 100644 (file)
@@ -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 (file)
index 0000000..d878dba
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+namespace Database\Seeders;
+
+use Illuminate\Database\Console\Seeds\WithoutModelEvents;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Database\Seeder;
+
+class MenuitemWorxerSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     */
+    public function run(): void
+    {
+        DB::table('menuitems')->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'
+        ]);
+      }
+}
index 8bce0343114fd47976f74b43feaff0fc482beedc..90b3299080bf5face64af2c1c68e3d01ffb2e644 100755 (executable)
@@ -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