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'); + }); + } +};