Enth\u00e4lt gemischt: Laravel-10-Upgrade + Phase 1 (Contacts-Modul, Duplicats-Commands, Soft-Delete+Merge-Fields) + Phase 2 Code-Umstellungen (inquiry_id, $table='contacts'/'inquiries') + Offers-Modul (Migrationen, Models, offer_id in Booking, offer-Disk in filesystems.php). Phase 2 + Offers werden im folgenden Commit nach dev/backups/phase2-offers-2026-04-17/ verschoben, damit der Workspace auf Phase-1-only (= Test-System-Stand) reduziert ist und direkt auf Live deploybar wird. Tarball-Backup zus\u00e4tzlich unter: ../backups-safety/workspace-pre-phase1-rollback-2026-04-17.tar.gz Made-with: Cursor
43 lines
1 KiB
PHP
Executable file
43 lines
1 KiB
PHP
Executable file
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Facades\Hash;
|
|
use Illuminate\Support\Str;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\User>
|
|
*/
|
|
class UserFactory extends Factory
|
|
{
|
|
protected $model = User::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => fake()->name(),
|
|
'email' => fake()->unique()->safeEmail(),
|
|
'password' => Hash::make('password'),
|
|
'remember_token' => Str::random(10),
|
|
'active' => 1,
|
|
'admin' => 0,
|
|
'confirmed' => 1,
|
|
];
|
|
}
|
|
|
|
public function admin(): static
|
|
{
|
|
return $this->state(fn (array $attributes) => [
|
|
'admin' => 1,
|
|
]);
|
|
}
|
|
|
|
public function inactive(): static
|
|
{
|
|
return $this->state(fn (array $attributes) => [
|
|
'active' => 0,
|
|
]);
|
|
}
|
|
}
|