Initial Commit
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Cabel;
|
||||
use App\Models\CabelCategory;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CabelSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$items = [
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Netværk')->first()->id,
|
||||
'name' => '0-1m',
|
||||
'total' => 138,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Netværk')->first()->id,
|
||||
'name' => '1-2m',
|
||||
'total' => 32,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Netværk')->first()->id,
|
||||
'name' => '2-5m',
|
||||
'total' => 54,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Netværk')->first()->id,
|
||||
'name' => '5-10m',
|
||||
'total' => 32,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Skærm')->first()->id,
|
||||
'name' => 'DisplayPort',
|
||||
'total' => 13,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Skærm')->first()->id,
|
||||
'name' => 'VGA',
|
||||
'total' => 75,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Skærm')->first()->id,
|
||||
'name' => 'HDMI',
|
||||
'total' => 51,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Skærm')->first()->id,
|
||||
'name' => 'DVI',
|
||||
'total' => 71,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Skærm')->first()->id,
|
||||
'name' => 'DVI fuld',
|
||||
'total' => 70,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Adapters/Convertors')->first()->id,
|
||||
'name' => 'VGA til Mini HDMI',
|
||||
'total' => 1,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Adapters/Convertors')->first()->id,
|
||||
'name' => 'VGA til DVI',
|
||||
'total' => 1,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Adapters/Convertors')->first()->id,
|
||||
'name' => 'HDMI til DVI',
|
||||
'total' => 2,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Adapters/Convertors')->first()->id,
|
||||
'name' => 'Konsole USB til VGA Adaptor',
|
||||
'total' => 20,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Strøm')->first()->id,
|
||||
'name' => 'Strømkabler med jord',
|
||||
'total' => 191,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Strøm')->first()->id,
|
||||
'name' => 'Stikdåse ',
|
||||
'total' => 148,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','USB')->first()->id,
|
||||
'name' => 'USB-A til Mini-USB',
|
||||
'total' => 2,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','USB')->first()->id,
|
||||
'name' => 'USB-A til VGA 4 header',
|
||||
'total' => 1,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','USB')->first()->id,
|
||||
'name' => 'USB-A til DVI ',
|
||||
'total' => 1,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','USB')->first()->id,
|
||||
'name' => 'USB-A til USB-B',
|
||||
'total' => 11,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Konsole')->first()->id,
|
||||
'name' => 'Cisco Console til VGA',
|
||||
'total' => 44,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Konsole')->first()->id,
|
||||
'name' => 'Cisco USB til Mini-USB',
|
||||
'total' => 5,
|
||||
],
|
||||
[
|
||||
'cabel_category_id' => CabelCategory::where('name','=','Konsole')->first()->id,
|
||||
'name' => 'Cisco USB til Console',
|
||||
'total' => 23,
|
||||
],
|
||||
];
|
||||
foreach ($items as $item) {
|
||||
Cabel::create($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user