Grundgerüst Formulare und Seeder
This commit is contained in:
28
database/seeders/ContactgroupSeeder.php
Normal file
28
database/seeders/ContactgroupSeeder.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Contactgroup;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class ContactgroupSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$contactgroups = [
|
||||
'Personalabteilung',
|
||||
'Geschäftsführung',
|
||||
'Support',
|
||||
'Entwicklung',
|
||||
'Finanzen',
|
||||
];
|
||||
foreach ($contactgroups as $contactgroup) {
|
||||
Contactgroup::firstOrCreate(['name' => $contactgroup]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user