ProductCategory::where('name','=','Laptop')->first()->id, 'product_subcategory_id' => ProductSubcategory::where('name','=','Server Rum')->first()->id, 'brand_id' => Brand::where('name','=','Test Brand')->first()->id, 'product_model_id' => ProductModel::where('name','=','Test Model')->first()->id, 'name' => 'Test Product', 'description' => "Test Description", 'total' => 100, 'barcode' => "Test.Product.0001", ], [ 'product_category_id' => ProductCategory::where('name','=','Laptop')->first()->id, 'brand_id' => Brand::where('name','=','Test Brand')->first()->id, 'product_model_id' => ProductModel::where('name','=','Test Model')->first()->id, 'name' => 'Test Product 2', 'description' => "Test Description 2", 'total' => 100, 'barcode' => "Test.Product.0002", ], ]; foreach ($items as $item) { Product::create($item); } } }