2017-10-07 04:25:35 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Asset Model Factories
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Factories related exclusively to creating models ..
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
$factory->define(App\Models\License::class, function (Faker\Generator $faker) {
|
|
|
|
|
2017-10-07 04:34:51 -07:00
|
|
|
return [
|
2017-10-07 04:25:35 -07:00
|
|
|
'user_id' => 1,
|
2017-10-07 05:32:39 -07:00
|
|
|
'license_name' => $faker->name,
|
|
|
|
'license_email' => $faker->safeEmail,
|
2017-10-07 04:25:35 -07:00
|
|
|
'serial' => $faker->uuid,
|
|
|
|
'notes' => 'Created by DB seeder',
|
|
|
|
'purchase_date' => $faker->dateTimeBetween('-1 years','now', date_default_timezone_get()),
|
|
|
|
'order_number' => $faker->numberBetween(1000000, 50000000),
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
// 1
|
|
|
|
$factory->state(App\Models\License::class, 'photoshop', function ($faker) {
|
2017-10-07 04:34:51 -07:00
|
|
|
$data = [
|
2017-10-07 05:34:13 -07:00
|
|
|
'name' => 'Photoshop',
|
2017-10-07 04:25:35 -07:00
|
|
|
'manufacturer_id' => 9,
|
2017-10-07 04:43:55 -07:00
|
|
|
'purchase_cost' => '299.99',
|
2017-10-07 04:25:35 -07:00
|
|
|
'seats' => 10,
|
2018-02-22 21:46:58 -08:00
|
|
|
'purchase_order' => '13503Q',
|
|
|
|
'maintained' => true
|
2017-10-07 04:25:35 -07:00
|
|
|
];
|
2017-10-07 04:34:51 -07:00
|
|
|
|
|
|
|
return $data;
|
|
|
|
|
2017-10-07 04:25:35 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
// 2
|
|
|
|
$factory->state(App\Models\License::class, 'acrobat', function ($faker) {
|
2017-10-07 04:34:51 -07:00
|
|
|
|
|
|
|
$data = [
|
2017-10-07 04:25:35 -07:00
|
|
|
'name' => 'Acrobat',
|
|
|
|
'manufacturer_id' => 9,
|
2017-10-07 04:43:55 -07:00
|
|
|
'purchase_cost' => '29.99',
|
2017-10-07 04:25:35 -07:00
|
|
|
'seats' => 10,
|
|
|
|
];
|
2017-10-07 08:17:38 -07:00
|
|
|
|
2017-10-07 04:34:51 -07:00
|
|
|
|
|
|
|
return $data;
|
2017-10-07 04:25:35 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
// 3
|
|
|
|
$factory->state(App\Models\License::class, 'indesign', function ($faker) {
|
2017-10-07 04:34:51 -07:00
|
|
|
$data = [
|
2017-10-07 04:25:35 -07:00
|
|
|
'name' => 'InDesign',
|
|
|
|
'manufacturer_id' => 9,
|
2017-10-07 04:43:55 -07:00
|
|
|
'purchase_cost' => '199.99',
|
2017-10-07 04:34:51 -07:00
|
|
|
'seats' => 10,
|
2017-10-07 04:25:35 -07:00
|
|
|
];
|
2017-10-07 08:17:38 -07:00
|
|
|
|
2017-10-07 04:34:51 -07:00
|
|
|
|
|
|
|
return $data;
|
2017-10-07 04:25:35 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 4
|
|
|
|
$factory->state(App\Models\License::class, 'office', function ($faker) {
|
2017-10-07 04:34:51 -07:00
|
|
|
$data = [
|
2017-10-07 04:25:35 -07:00
|
|
|
'name' => 'Office',
|
|
|
|
'manufacturer_id' => 2,
|
2017-10-07 04:43:55 -07:00
|
|
|
'purchase_cost' => '49.99',
|
2017-10-07 04:25:35 -07:00
|
|
|
'seats' => 20,
|
|
|
|
];
|
2017-10-07 04:34:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
return $data;
|
2017-10-07 04:25:35 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
|