ldc-legaulois/database/factories/DepartaimantsCollectionFactory.php
2024-10-24 08:45:29 +00:00

41 lines
909 B
PHP

<?php
namespace Database\Factories;
use App\Models\DepartaimantsCollection;
use Illuminate\Database\Eloquent\Factories\Factory;
class DepartaimantsCollectionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = DepartaimantsCollection::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition(): array
{
$bigNumber = function () {
// * prevent the first number from being 0
$output = rand(1, 9);
for ($i = 0; $i < 18; $i++) {
$output .= rand(0, 9);
}
return $output;
};
return [
'col1' => $bigNumber(),
'col2' => $bigNumber(),
'col3' => $bigNumber(),
'col4' => rand(0, 160),
];
}
}