Add seeders for Calculationpresets and Printertypes, and register them in DatabaseSeeder

This commit is contained in:
2026-01-25 08:06:00 +01:00
parent 0356063015
commit ec37f6b421
3 changed files with 58 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Database\Seeders;
use App\Models\Printertype;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class PrintertypeSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Create Predefined Printer Types
$printertypes = [
['name' => 'Bambulab P1S', 'manufacturer_id' => 1, 'description' => 'Standard printer type.', 'temp_max' => '300', 'bed_size_x' => '25.6', 'bed_size_y' => '25.6', 'price' => 559],
['name' => 'Bambulab P2S', 'manufacturer_id' => 1, 'description' => 'Standard printer type.', 'temp_max' => '300', 'bed_size_x' => '25.6', 'bed_size_y' => '25.6', 'price' => 749],
];
foreach ($printertypes as $printertype) {
Printertype::create($printertype);
}
}
}