51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Post;
|
|
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use App\Models\User;
|
|
use App\Models\Category;
|
|
use Illuminate\Support\Str;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Seed the application's database.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
// User::factory(10)->create();
|
|
|
|
// User::factory()->create([
|
|
// 'name' => 'Test User',
|
|
// 'email' => 'test@example.com',
|
|
// ]);
|
|
|
|
|
|
|
|
|
|
// Category::create([
|
|
// 'name' => 'Web Design',
|
|
// 'slug' => 'web-design'
|
|
// ]);
|
|
|
|
// Post::create([
|
|
// 'title' => 'Judul Artikel 1',
|
|
// 'author_id' => 1,
|
|
// 'category_id' => 1,
|
|
// 'slug' => 'judul -artikel-1',
|
|
// 'body' => 'lorem ipsum dajowjjjjjjjjjjjjjjjjjjjjjjjfaoogaoidhgfuoagsduoabodsufbauosbfuodsafbuoadbfoadubfaosbfoasubfas'
|
|
// ]);
|
|
$this->call([
|
|
// UserSeeder::class,
|
|
KriteriaSeeder::class,
|
|
SubKriteriaSeeder::class,
|
|
KelompokTaniSeeder::class,
|
|
]);
|
|
|
|
}
|
|
}
|