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,21 @@
<?php
namespace Database\Seeders;
use App\Models\Content;
use App\Models\Page;
use Illuminate\Database\Seeder;
class ContentSeeder extends Seeder
{
public function run(): void
{
$pages = Page::all();
foreach ($pages as $page) {
Content::factory()->count(rand(3, 8))->create([
'page_id' => $page->id,
]);
}
}
}