34 lines
775 B
PHP
34 lines
775 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\BlogArticle;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class BlogArticleFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = BlogArticle::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'title' => $this->faker->text(100),
|
|
'slug' => $this->faker->slug(),
|
|
'date' => $this->faker->dateTimeBetween('-100 days'),
|
|
'summary' => $this->faker->text(200),
|
|
'content' => $this->faker->text(1000),
|
|
'published' => $this->faker->boolean(80),
|
|
];
|
|
}
|
|
}
|