Ekapp/skolehjem/database/seeds/ResourceCategorySeeder.php

33 lines
657 B
PHP
Raw Normal View History

<?php
use Illuminate\Database\Seeder;
class ResourceCategorySeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$categoryData = [
[
'name' => 'image',
'description' => '',
'slug' => '',
],
];
foreach ($categoryData as $data) {
$category = new \App\ResourceCategory();
$category->name = $data["name"];
$category->description = $data["description"];
$category->slug = $data["slug"];
$category->save();
}
}
}