Ekapp/skolehjem/database/seeds/ContactSeeder.php

72 lines
2.1 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' => "40886515",
'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' => "Anja Holm Brix",
'email' => "ahb@sde.dk",
'title' => "Kollegieassistent",
'phone' => null,
'phonetimes' => "",
],
[
'contactname' => "Britta Overgaard Brink Olsen",
'email' => "brio@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();
}
}
}