2021-06-10 13:17:44 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Model Factories
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here you may define all of your model factories. Model factories give
|
|
|
|
| you a convenient way to create models for testing and seeding your
|
|
|
|
| database. Just tell the factory how a default model should look.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use App\Models\AssetModel;
|
|
|
|
use App\Models\Category;
|
|
|
|
use App\Models\Company;
|
|
|
|
use App\Models\Location;
|
|
|
|
use App\Models\Manufacturer;
|
|
|
|
use App\Models\Statuslabel;
|
|
|
|
use App\Models\Supplier;
|
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
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $model = \App\Models\Location::class;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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',
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|