Files
librenms-librenms/database/factories/ComponentFactory.php
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
614 B
PHP
Raw Normal View History

2020-11-03 17:18:31 +01:00
<?php
namespace Database\Factories;
use App\Models\Component;
use Illuminate\Database\Eloquent\Factories\Factory;
2021-07-26 16:00:34 +02:00
/** @extends Factory<Component> */
2020-11-03 17:18:31 +01:00
class ComponentFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Component::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
2021-07-13 16:35:43 -05:00
'device_id' => $this->faker->randomDigit(),
2020-11-03 17:18:31 +01:00
'type' => $this->faker->regexify('[A-Za-z0-9]{4,20}'),
];
}
}