33 lines
657 B
PHP
33 lines
657 B
PHP
<?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();
|
|
}
|
|
}
|
|
}
|