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