2022-08-30 13:21:07 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
|
|
use App\Models\Package;
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
|
|
|
|
|
|
class PackageFactory extends Factory
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $model = Package::class;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the model's default state.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
2025-04-08 11:47:49 +02:00
|
|
|
public function definition(): array
|
2022-08-30 13:21:07 +00:00
|
|
|
{
|
|
|
|
|
return [
|
2025-04-08 11:47:49 +02:00
|
|
|
'name' => $this->faker->name,
|
2022-08-30 13:21:07 +00:00
|
|
|
'amount' => $this->faker->unique()->randomFloat(2, 120, 850)
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|