share-lt/database/factories/EntryFactory.php
jon brookes 6fbeedd50c feat: implement basic API
with authorization and validation
2026-01-07 19:52:23 +00:00

26 lines
599 B
PHP

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Entry>
*/
class EntryFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'title' => $this->faker->sentence,
'content' => $this->faker->paragraph,
'slug' => Str::slug($this->faker->sentence) . '-' . Str::uuid(),
];
}
}