From e457e7a81c5e6f370dbf916f6290f27d8ed98190 Mon Sep 17 00:00:00 2001 From: Kevin Adametz Date: Wed, 8 Jul 2026 09:20:32 +0000 Subject: [PATCH] =?UTF-8?q?Profilfeld=20users.agency=5Fname=20f=C3=BCr=20?= =?UTF-8?q?=C3=9Cbermittler-Attribution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Erster Schritt des Umbaus Agentur-Attribution → User-Profil (dev/agentur-attribution/entwicklungsplan.md, A1): Die Übermittler- Angabe wird Profil-Eigenschaft des einliefernden Accounts statt Pseudo-Firma vom Typ „agency". Co-Authored-By: Claude Fable 5 --- app/Models/User.php | 1 + database/factories/UserFactory.php | 5 +++ ..._111908_add_agency_name_to_users_table.php | 31 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 database/migrations/2026_07_08_111908_add_agency_name_to_users_table.php diff --git a/app/Models/User.php b/app/Models/User.php index 96b8109f..1fa4936a 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -32,6 +32,7 @@ class User extends Authenticatable implements MustVerifyEmail */ protected $fillable = [ 'name', + 'agency_name', 'email', 'portal', 'registration_type', diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index e8fe00e2..eb00537a 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -41,6 +41,11 @@ class UserFactory extends Factory ]); } + public function withAgency(string $agencyName = 'Muster Presseverteiler'): static + { + return $this->state(['agency_name' => $agencyName]); + } + public function inactive(): static { return $this->state(['is_active' => false]); diff --git a/database/migrations/2026_07_08_111908_add_agency_name_to_users_table.php b/database/migrations/2026_07_08_111908_add_agency_name_to_users_table.php new file mode 100644 index 00000000..4d2961f8 --- /dev/null +++ b/database/migrations/2026_07_08_111908_add_agency_name_to_users_table.php @@ -0,0 +1,31 @@ +string('agency_name', 190)->nullable()->after('name'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('agency_name'); + }); + } +};