*/ class DropOffPointFactory extends Factory { protected $model = DropOffPoint::class; public function definition(): array { return [ 'uuid' => (string) Str::uuid(), 'name' => fake()->company().' DOP', 'code' => 'DOP-'.strtoupper(Str::random(6)), 'coordinates' => new Point(14.6, 121.0, 4326), 'address_line' => fake()->streetAddress(), 'capacity_kg' => 1000, 'status' => DropOffPoint::STATUS_ACTIVE, ]; } public function at(float $lat, float $lng): static { return $this->state(fn () => [ 'coordinates' => new Point($lat, $lng, 4326), ]); } }