snipe-it/database/factories/LocationFactory.php
snipe 24ad74f136 Updated factories
Signed-off-by: snipe <snipe@snipe.net>
2024-07-05 08:21:18 +01:00

38 lines
943 B
PHP

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class LocationFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'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(),
'image' => rand(1, 9).'.jpg',
];
}
public function deletedLocation()
{
return $this->state(function () {
return [
'deleted_at' => $this->faker->dateTime(),
];
});
}
}