mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
58 lines
1.6 KiB
PHP
58 lines
1.6 KiB
PHP
<?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;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class SupplierFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = \App\Models\Supplier::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'name' => $this->faker->company,
|
|
'address' => $this->faker->streetAddress,
|
|
'address2' => $this->faker->secondaryAddress,
|
|
'city' => $this->faker->city,
|
|
'state' => $this->faker->stateAbbr,
|
|
'zip' => $this->faker->postCode,
|
|
'country' => $this->faker->countryCode,
|
|
'contact' => $this->faker->name,
|
|
'phone' => $this->faker->phoneNumber,
|
|
'fax' => $this->faker->phoneNumber,
|
|
'email' => $this->faker->safeEmail,
|
|
'url' => $this->faker->url,
|
|
'notes' => $this->faker->text(191), // Supplier notes can be a max of 255 characters.
|
|
];
|
|
}
|
|
}
|