Init(Core): add project to git and add seeders and factory

This commit is contained in:
2026-04-28 21:29:43 +03:30
commit 15bd23cdd2
101 changed files with 12093 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use App\Models\Post;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class PostFactory extends Factory
{
protected $model = Post::class;
public function definition(): array
{
$title = fake()->sentence();
return [
'title' => $title,
'description' => fake()->optional()->text(200),
'content' => fake()->paragraphs(5, true),
'slug' => Str::slug($title),
'image_path' => fake()->imageUrl(800, 600, 'posts'),
'image_thumbnail' => fake()->imageUrl(200, 200, 'posts'),
'image_alt' => fake()->sentence(),
'user_token' => fake()->uuid(),
];
}
}