12-05-2026 Frontend dev
This commit is contained in:
parent
405df0a122
commit
5b8bdf4182
779 changed files with 480564 additions and 6241 deletions
42
database/factories/FooterCodeFactory.php
Normal file
42
database/factories/FooterCodeFactory.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\Portal;
|
||||
use App\Models\FooterCode;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<FooterCode>
|
||||
*/
|
||||
class FooterCodeFactory extends Factory
|
||||
{
|
||||
protected $model = FooterCode::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'portal' => fake()->randomElement([
|
||||
Portal::Both->value,
|
||||
Portal::Presseecho->value,
|
||||
Portal::Businessportal24->value,
|
||||
]),
|
||||
'language' => fake()->randomElement([null, 'de', 'en']),
|
||||
'title' => fake()->sentence(3),
|
||||
'content' => fake()->paragraph(),
|
||||
'is_global' => false,
|
||||
'is_active' => true,
|
||||
'priority' => fake()->numberBetween(0, 100),
|
||||
];
|
||||
}
|
||||
|
||||
public function global(): static
|
||||
{
|
||||
return $this->state(['is_global' => true]);
|
||||
}
|
||||
|
||||
public function inactive(): static
|
||||
{
|
||||
return $this->state(['is_active' => false]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue