2018-09-29 22:17:36 -07:00
|
|
|
<?php
|
2021-06-10 13:17:44 -07:00
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
2018-09-29 22:17:36 -07:00
|
|
|
|
2021-06-10 13:17:44 -07:00
|
|
|
class CustomFieldsetFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $model = \App\Models\CustomFieldset::class;
|
2018-09-29 22:17:36 -07:00
|
|
|
|
2021-06-10 13:17:44 -07:00
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'name' => $this->faker->catchPhrase,
|
|
|
|
];
|
|
|
|
}
|
2018-09-29 22:17:36 -07:00
|
|
|
|
2021-06-10 13:17:44 -07:00
|
|
|
public function mobile()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Mobile Devices',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function computer()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Laptops and Desktops',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|