From 1faae99361857472893878bde8261616ad1b45d6 Mon Sep 17 00:00:00 2001 From: Louis Jeckel Date: Wed, 14 Jul 2021 18:16:03 +0200 Subject: [PATCH] free string organization users --- app/Nova/User.php | 3 +- ...5_add_organization_free_field_to_users.php | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2021_07_14_160635_add_organization_free_field_to_users.php diff --git a/app/Nova/User.php b/app/Nova/User.php index 7cfd351..49b7336 100644 --- a/app/Nova/User.php +++ b/app/Nova/User.php @@ -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 index 0000000..05a4742 --- /dev/null +++ b/database/migrations/2021_07_14_160635_add_organization_free_field_to_users.php @@ -0,0 +1,32 @@ +string('organization_str')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('organization_str'); + }); + } +} -- 2.39.5