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.
26 lines
746 B
PHTML
26 lines
746 B
PHTML
3 months ago
|
<?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',
|
||
|
];
|
||
|
}
|
||
|
}
|