28 lines
533 B
PHP
28 lines
533 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\News;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\News>
|
|
*/
|
|
class NewsFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
|
|
protected $model = News::class;
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'title' => fake()->word(),
|
|
'content' => fake()->text(),
|
|
];
|
|
}
|
|
}
|