Heimdall/database/factories/ItemFactory.php

30 lines
548 B
PHP
Raw Normal View History

2022-11-26 13:35:36 +00:00
<?php
namespace Database\Factories;
use App\Item;
use Illuminate\Database\Eloquent\Factories\Factory;
class ItemFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Item::class;
/**
* Define the model's default state.
*
* @return array
*/
2022-12-04 09:14:07 +00:00
public function definition(): array
2022-11-26 13:35:36 +00:00
{
return [
'title' => $this->faker->unique()->text(),
'url' => $this->faker->unique()->url(),
];
}
}