v0.5.3 - Added Locations and a location_id to washing machines
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class LocationSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$locationdata = [
|
||||
[
|
||||
"name" => "Bygning B"
|
||||
],
|
||||
[
|
||||
"name" => "Bygning E"
|
||||
]
|
||||
];
|
||||
|
||||
foreach ($locationdata as $data) {
|
||||
$location = new \App\Location();
|
||||
|
||||
$location->name = $data["name"];
|
||||
|
||||
$location->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user