Add seeders for Calculationpresets and Printertypes, and register them in DatabaseSeeder
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user