🛠️ Refactor service components: Add dynamic type filters, restructure landing page UI, and introduce ServiceForm for improved form handling and validations

This commit is contained in:
HolgerHatGarKeineNode
2025-12-07 01:06:20 +01:00
parent aef4deedd6
commit 14f717a2b9
10 changed files with 414 additions and 312 deletions

View File

@@ -19,16 +19,16 @@ class SelfHostedServiceFactory extends Factory
$name = $this->faker->unique()->company();
return [
'created_by' => User::factory(),
'created_by' => $this->faker->optional()->numberBetween(1,9),
'name' => $name,
'slug' => str($name)->slug(),
'intro' => $this->faker->optional()->paragraph(),
'url_clearnet' => $this->faker->optional()->url(),
'url_onion' => null,
'url_i2p' => null,
'url_pkdns' => null,
'url_onion' => $this->faker->optional()->url(),
'url_i2p' => $this->faker->optional()->url(),
'url_pkdns' => $this->faker->optional()->url(),
'type' => $this->faker->randomElement(SelfHostedServiceType::cases())->value,
'contact_url' => $this->faker->optional()->url(),
'contact' => $this->faker->optional()->url(),
];
}
}

View File

@@ -2,7 +2,7 @@
namespace Database\Seeders;
use App\Models\User;
use App\Models\SelfHostedService;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
@@ -13,9 +13,6 @@ class DatabaseSeeder extends Seeder
*/
public function run(): void
{
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
SelfHostedService::factory(10)->create();
}
}