massive improvements to tests, streamlined and synced migrations, fixed a lot of wrong or old table field references. implemented a lot of pages in react for website frontend

This commit is contained in:
Codex Agent
2025-09-30 21:09:52 +02:00
parent 21c9391e2c
commit d1733686a6
114 changed files with 2867 additions and 2411 deletions

View File

@@ -0,0 +1,62 @@
<?php
namespace Database\Factories;
use App\Models\Package;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class PackageFactory extends Factory
{
protected $model = Package::class;
public function definition(): array
{
$name = $this->faker->word();
return [
'name' => $name,
'slug' => Str::slug($name . '-' . uniqid()),
'description' => $this->faker->sentence(),
'price' => $this->faker->randomFloat(2, 0, 100),
'max_photos' => $this->faker->numberBetween(100, 1000),
'max_guests' => $this->faker->numberBetween(50, 500),
'gallery_days' => $this->faker->numberBetween(7, 30),
'max_events_per_year' => $this->faker->numberBetween(1, 10),
'features' => json_encode([
'photo_likes_enabled' => $this->faker->boolean(),
'event_checklist' => $this->faker->boolean(),
'custom_domain' => $this->faker->boolean(),
'advanced_analytics' => $this->faker->boolean(),
]),
'type' => $this->faker->randomElement(['endcustomer', 'reseller']),
];
}
public function free(): static
{
return $this->state(fn (array $attributes) => [
'price' => 0,
]);
}
public function paid(): static
{
return $this->state(fn (array $attributes) => [
'price' => $this->faker->randomFloat(2, 5, 100),
]);
}
public function endcustomer(): static
{
return $this->state(fn (array $attributes) => [
'type' => 'endcustomer',
]);
}
public function reseller(): static
{
return $this->state(fn (array $attributes) => [
'type' => 'reseller',
]);
}
}