jonnybarnes.uk/database/factories/PlaceFactory.php

35 lines
751 B
PHP
Raw Normal View History

2020-10-17 17:15:06 +01:00
<?php
namespace Database\Factories;
use App\Models\Place;
use Illuminate\Database\Eloquent\Factories\Factory;
2023-02-18 09:34:57 +00:00
/**
2026-04-07 09:01:19 +01:00
* @extends Factory<Place>
2023-02-18 09:34:57 +00:00
*/
2020-10-17 17:15:06 +01:00
class PlaceFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Place::class;
/**
* Define the model's default state.
*
2023-02-18 09:34:57 +00:00
* @return array<string, mixed>
2020-10-17 17:15:06 +01:00
*/
2023-02-18 09:34:57 +00:00
public function definition(): array
2020-10-17 17:15:06 +01:00
{
return [
'name' => $this->faker->company,
'description' => $this->faker->sentence,
'latitude' => $this->faker->latitude,
'longitude' => $this->faker->longitude,
'external_urls' => $this->faker->url,
];
}
}