2017-10-07 02:27:02 -07:00
|
|
|
<?php
|
2021-06-10 13:19:27 -07:00
|
|
|
|
2021-06-10 13:17:44 -07:00
|
|
|
namespace Database\Factories;
|
|
|
|
|
2023-03-20 11:39:27 -07:00
|
|
|
use App\Models\Manufacturer;
|
2023-03-14 11:34:58 -07:00
|
|
|
use App\Models\User;
|
2021-06-10 13:19:27 -07:00
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
2017-10-07 02:27:02 -07:00
|
|
|
|
2021-06-10 13:17:44 -07:00
|
|
|
class ManufacturerFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
2023-03-20 11:39:27 -07:00
|
|
|
protected $model = Manufacturer::class;
|
2021-06-10 13:17:44 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
2023-09-19 17:02:18 -07:00
|
|
|
'name' => $this->faker->unique()->company(),
|
2024-09-17 14:16:41 -07:00
|
|
|
'created_by' => User::factory()->superuser(),
|
2021-06-10 13:17:44 -07:00
|
|
|
'support_phone' => $this->faker->phoneNumber(),
|
|
|
|
'url' => $this->faker->url(),
|
|
|
|
'support_email' => $this->faker->safeEmail(),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function apple()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Apple',
|
|
|
|
'url' => 'https://apple.com',
|
|
|
|
'support_url' => 'https://support.apple.com',
|
2023-04-26 16:39:15 -07:00
|
|
|
'warranty_lookup_url' => 'https://checkcoverage.apple.com',
|
2021-06-10 13:17:44 -07:00
|
|
|
'image' => 'apple.jpg',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function microsoft()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Microsoft',
|
|
|
|
'url' => 'https://microsoft.com',
|
|
|
|
'support_url' => 'https://support.microsoft.com',
|
2023-04-26 16:39:15 -07:00
|
|
|
'warranty_lookup_url' => 'https://account.microsoft.com/devices',
|
2021-06-10 13:17:44 -07:00
|
|
|
'image' => 'microsoft.png',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function dell()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Dell',
|
|
|
|
'url' => 'https://dell.com',
|
|
|
|
'support_url' => 'https://support.dell.com',
|
2023-04-26 16:39:15 -07:00
|
|
|
'warranty_lookup_url' => 'https://www.dell.com/support/home/en-us/Products/?app=warranty',
|
2021-06-10 13:17:44 -07:00
|
|
|
'image' => 'dell.png',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function asus()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Asus',
|
|
|
|
'url' => 'https://asus.com',
|
|
|
|
'support_url' => 'https://support.asus.com',
|
|
|
|
'image' => 'asus.png',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hp()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'HP',
|
|
|
|
'url' => 'https://hp.com',
|
|
|
|
'support_url' => 'https://support.hp.com',
|
|
|
|
'image' => 'hp.png',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function lenovo()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Lenovo',
|
|
|
|
'url' => 'https://lenovo.com',
|
|
|
|
'support_url' => 'https://support.lenovo.com',
|
|
|
|
'image' => 'lenovo.jpg',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function lg()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'LG',
|
|
|
|
'url' => 'https://lg.com',
|
|
|
|
'support_url' => 'https://support.lg.com',
|
|
|
|
'image' => 'lg.jpg',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function polycom()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Polycom',
|
|
|
|
'url' => 'https://polycom.com',
|
|
|
|
'support_url' => 'https://support.polycom.com',
|
|
|
|
'image' => 'polycom.png',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function adobe()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Adobe',
|
|
|
|
'url' => 'https://adobe.com',
|
|
|
|
'support_url' => 'https://support.adobe.com',
|
|
|
|
'image' => 'adobe.jpg',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function avery()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Avery',
|
|
|
|
'url' => 'https://avery.com',
|
|
|
|
'support_url' => 'https://support.avery.com',
|
|
|
|
'image' => 'avery.png',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function crucial()
|
|
|
|
{
|
|
|
|
return $this->state(function () {
|
|
|
|
return [
|
|
|
|
'name' => 'Crucial',
|
|
|
|
'url' => 'https://crucial.com',
|
|
|
|
'support_url' => 'https://support.crucial.com',
|
|
|
|
'image' => 'crucial.jpg',
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|