created Seeder for initial Database
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Manufacturer;
|
||||
|
||||
class ManufacturerSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// Create predefined Manufacturers
|
||||
$manufacturers = [
|
||||
['name' => 'Bambulab', 'description' => 'Bambulab is a manufacturer of high quality products.', 'website' => 'https://bambulab.com', 'logo' => 'https://example.com/bambulab-logo.png']
|
||||
|
||||
];
|
||||
|
||||
foreach ($manufacturers as $manufacturer) {
|
||||
Manufacturer::create($manufacturer);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user