- kasih return type - menyesuaikan factory - mengganti modalName - menyesuaikan seeder - menyesuaikan panggil component
21 lines
442 B
PHP
21 lines
442 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Faq;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class FaqFactory extends Factory
|
|
{
|
|
protected $model = Faq::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'question' => 'Sample FAQ question?',
|
|
'answer' => 'This is a sample answer for the FAQ.',
|
|
'sort_order' => $this->faker->numberBetween(1, 50),
|
|
];
|
|
}
|
|
}
|