40 lines
983 B
PHP
40 lines
983 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Site;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class SiteFactory extends Factory
|
|
{
|
|
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = Site::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'url' => $this->faker->unique()->url,
|
|
'name' => sprintf(
|
|
'%s-%s',
|
|
$this->faker->unique()->company(),
|
|
$this->faker->unique()->city()
|
|
),
|
|
'email_contact' => $this->faker->unique()->email(),
|
|
'address' => $this->faker->streetAddress(),
|
|
'city' => $this->faker->city(),
|
|
'postcode' => $this->faker->postcode(),
|
|
'latitude' => $this->faker->latitude(),
|
|
'longitude' => $this->faker->longitude(),
|
|
];
|
|
}
|
|
}
|