You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
topnotch_website/database/factories/ServiceFileFactory.php

27 lines
866 B
PHP

<?php
namespace Database\Factories;
use App\Models\ServiceFile;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
class ServiceFileFactory extends Factory
{
protected $model = ServiceFile::class;
public function definition(): array
{
return [
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
'code' => $this->faker->randomElement(['A', 'B']).$this->faker->randomNumber(4, true),
'name' => $this->faker->word(),
'width' => round($this->faker->randomFloat(2, 0, 10), 1),
'height' => round($this->faker->randomFloat(2, 0, 10), 1),
'unit' => 'inch',
'notes' => $this->faker->randomElement(['1) 1149 2) grey 3) white', '1) white', '1) black 2) white']),
];
}
}