]> _ Git - psq.git/commitdiff
free string organization users
authorLouis Jeckel <louis.jeckel@outlook.com>
Wed, 14 Jul 2021 16:16:03 +0000 (18:16 +0200)
committerLouis Jeckel <louis.jeckel@outlook.com>
Wed, 14 Jul 2021 16:16:03 +0000 (18:16 +0200)
app/Nova/User.php
database/migrations/2021_07_14_160635_add_organization_free_field_to_users.php [new file with mode: 0644]

index 7cfd3518e9d8837a261c527c2c0e7e8c50668576..49b7336bdd600a46a125cb13d5534d9e08cb4d04 100644 (file)
@@ -108,7 +108,8 @@ class User extends Resource
             ]),
             new Panel('Affiliation', [
                 BelongsTo::make('Organisation', 'organization', Organization::class)->searchable()->nullable(),
-            ]),
+                Text::make('Organisation (libre)', 'organization_str')->nullable(),
+                ]),
 
             HasMany::make('Emails envoyés', 'sentEmails', SentEmail::class),
         ], $this->extraFields(), [
diff --git a/database/migrations/2021_07_14_160635_add_organization_free_field_to_users.php b/database/migrations/2021_07_14_160635_add_organization_free_field_to_users.php
new file mode 100644 (file)
index 0000000..05a4742
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddOrganizationFreeFieldToUsers extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('users', function (Blueprint $table) {
+            $table->string('organization_str')->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('users', function (Blueprint $table) {
+            $table->dropColumn('organization_str');
+        });
+    }
+}