first commit
This commit is contained in:
commit
e687b4437b
418 files changed
+33577
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class PostFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
{
|
||||
$title = fake()->unique()->sentence();
|
||||
|
||||
return [
|
||||
'title' => $title,
|
||||
'slug' => Str::slug($title),
|
||||
'content' => fake()->paragraphs(3, true),
|
||||
'status' => fake()->randomElement(['draft', 'publish']),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user