Files
animethemes-server/database/factories/Admin/FeatureFactory.php
T
paranarimasuandGitHub 088ea287c5 feat: initial migration to pennant features for feature flags and global site config [incremental] (#573)
* feat: initial commit for feature management

* style: fix StyleCI findings

* fix(api): prohibit features of nonnull scope from API & fix(admin): wrong translate key

* style: fix Static Analysis error
2023-04-23 18:54:34 -05:00

42 lines
900 B
PHP

<?php
declare(strict_types=1);
namespace Database\Factories\Admin;
use App\Constants\FeatureConstants;
use App\Models\Admin\Feature;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* Class FeatureFactory.
*
* @method Feature createOne($attributes = [])
* @method Feature makeOne($attributes = [])
*
* @extends Factory<Feature>
*/
class FeatureFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var class-string<Feature>
*/
protected $model = Feature::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition(): array
{
return [
Feature::ATTRIBUTE_NAME => fake()->unique()->word(),
Feature::ATTRIBUTE_SCOPE => FeatureConstants::NULL_SCOPE,
Feature::ATTRIBUTE_VALUE => fake()->boolean(),
];
}
}