2017-09-18 12:29:08 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
$factory->define(App\Models\CustomField::class, function (Faker\Generator $faker) {
|
|
|
|
return [
|
|
|
|
'name' => $faker->catchPhrase,
|
2018-04-23 21:17:26 -07:00
|
|
|
'format' => '',
|
2017-09-18 12:29:08 -07:00
|
|
|
'element' => 'text',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
2018-09-29 22:17:36 -07:00
|
|
|
$factory->state(App\Models\CustomField::class, 'imei', function ($faker) {
|
2017-09-18 12:29:08 -07:00
|
|
|
return [
|
2018-09-29 22:17:36 -07:00
|
|
|
'name' => 'IMEI',
|
|
|
|
'help_text' => 'The IMEI number for this device.',
|
2018-09-29 22:41:17 -07:00
|
|
|
'format' => 'regex:/^[0-9]{15}$/',
|
2017-09-18 12:29:08 -07:00
|
|
|
];
|
|
|
|
});
|
2018-09-29 22:17:36 -07:00
|
|
|
|
|
|
|
$factory->state(App\Models\CustomField::class, 'phone', function ($faker) {
|
|
|
|
return [
|
|
|
|
'name' => 'Phone Number',
|
|
|
|
'help_text' => 'Enter the phone number for this device.',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
$factory->state(App\Models\CustomField::class, 'ram', function ($faker) {
|
|
|
|
return [
|
|
|
|
'name' => 'RAM',
|
|
|
|
'help_text' => 'The amount of RAM this device has.',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
$factory->state(App\Models\CustomField::class, 'cpu', function ($faker) {
|
|
|
|
return [
|
|
|
|
'name' => 'CPU',
|
|
|
|
'help_text' => 'The speed of the processor on this device.',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$factory->state(App\Models\CustomField::class, 'mac-address', function ($faker) {
|
|
|
|
return [
|
|
|
|
'name' => 'MAC Address',
|
2018-09-29 22:41:17 -07:00
|
|
|
'format' => 'regex:/^([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}$/',
|
2018-09-29 22:17:36 -07:00
|
|
|
];
|
|
|
|
});
|
|
|
|
|