File: /home/armgroup/libs/database/factories/ArticleFactory.php
<?php
namespace Database\Factories;
use App\Models\Article;
use Illuminate\Database\Eloquent\Factories\Factory;
class ArticleFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Article::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'title' => $this->faker->sentence(5),
'slug' => $this->faker->unique()->slug,
'description' => $this->faker->sentence(16),
'content' => $this->faker->paragraph(20),
'status' => true,
];
}
}