2021-06-10 13:17:44 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
2021-06-10 13:19:27 -07:00
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
2021-06-10 13:17:44 -07:00
|
|
|
|
|
|
|
class LocationFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
2021-12-01 22:45:39 -08:00
|
|
|
'name' => $this->faker->city(),
|
|
|
|
'address' => $this->faker->streetAddress(),
|
|
|
|
'address2' => $this->faker->secondaryAddress(),
|
|
|
|
'city' => $this->faker->city(),
|
|
|
|
'state' => $this->faker->stateAbbr(),
|
|
|
|
'country' => $this->faker->countryCode(),
|
|
|
|
'currency' => $this->faker->currencyCode(),
|
|
|
|
'zip' => $this->faker->postcode(),
|
2021-06-10 13:17:44 -07:00
|
|
|
'image' => rand(1, 9).'.jpg',
|
|
|
|
];
|
|
|
|
}
|
2024-07-23 10:55:19 -07:00
|
|
|
|
|
|
|
// one of these can eventuall go away - left temporarily for conflict resolution
|
2024-05-23 13:51:26 -07:00
|
|
|
public function deleted(): self
|
|
|
|
{
|
|
|
|
return $this->state(['deleted_at' => $this->faker->dateTime()]);
|
|
|
|
}
|
2024-07-23 10:55:19 -07:00
|
|
|
|
2024-07-05 00:21:18 -07:00
|
|
|
public function deletedLocation()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'deleted_at' => $this->faker->dateTime(),
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
2021-06-10 13:17:44 -07:00
|
|
|
}
|