Ekapp/skolehjem/database/seeds/ContactSeeder.php

58 lines
1.6 KiB
PHP

<?php
use Illuminate\Database\Seeder;
class ContactSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$contactdata = [
[
'contactname' => "Claus Trasbo",
'email' => "ctr@sde.dk",
'title' => "Forstander for Erhvervskollegiet",
'phone' => null,
'phonetimes' => "",
],
[
'contactname' => "Birgitte True",
'email' => "bit@sde.dk",
'title' => "Erhverskollegie Sekretær",
'phone' => "63126715",
'phonetimes' => "<p><strong>Mandag-Torsdag:</strong> 8.00-15.00<br><strong>Fredag:</strong> 8.00-12.00</p>",
],
[
'contactname' => "Thomas Thomsen",
'email' => "thth@sde.dk",
'title' => "Kollegieassistent",
'phone' => null,
'phonetimes' => "",
],
[
'contactname' => "Jesper Sandberg",
'email' => "jesa@sde.dk",
'title' => "Kollegieassistent",
'phone' => null,
'phonetimes' => "",
],
];
foreach ($contactdata as $data) {
$contact = new \App\Contact();
$contact->contactname = $data["contactname"];
$contact->email = $data["email"];
$contact->title = $data["title"];
$contact->phone = $data["phone"];
$contact->phonetimes = $data["phonetimes"];
$contact->save();
}
}
}