🗃️ Add database schema, models & seeders (Story 1.2)
Migrations (translations, projects, skills, skill_project), Eloquent models with belongsToMany relations, scopes, and test seeders (74 translations FR/EN, 10 skills, 3 projects, 12 skill-project links). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
55
api/database/seeders/ProjectSeeder.php
Normal file
55
api/database/seeders/ProjectSeeder.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Project;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ProjectSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$projects = [
|
||||
[
|
||||
'slug' => 'skycel-portfolio',
|
||||
'title_key' => 'project.skycel-portfolio.title',
|
||||
'description_key' => 'project.skycel-portfolio.description',
|
||||
'short_description_key' => 'project.skycel-portfolio.short_description',
|
||||
'image' => 'projects/skycel-portfolio.png',
|
||||
'url' => 'https://skycel.dev',
|
||||
'github_url' => 'https://git.araneite.dev/skycel/Portfolio-Game',
|
||||
'date_completed' => '2026-03-01',
|
||||
'is_featured' => true,
|
||||
'display_order' => 1,
|
||||
],
|
||||
[
|
||||
'slug' => 'ecommerce-app',
|
||||
'title_key' => 'project.ecommerce-app.title',
|
||||
'description_key' => 'project.ecommerce-app.description',
|
||||
'short_description_key' => 'project.ecommerce-app.short_description',
|
||||
'image' => 'projects/ecommerce-app.png',
|
||||
'url' => null,
|
||||
'github_url' => 'https://github.com/skycel/ecommerce-app',
|
||||
'date_completed' => '2025-09-15',
|
||||
'is_featured' => true,
|
||||
'display_order' => 2,
|
||||
],
|
||||
[
|
||||
'slug' => 'analytics-dashboard',
|
||||
'title_key' => 'project.analytics-dashboard.title',
|
||||
'description_key' => 'project.analytics-dashboard.description',
|
||||
'short_description_key' => 'project.analytics-dashboard.short_description',
|
||||
'image' => 'projects/analytics-dashboard.png',
|
||||
'url' => null,
|
||||
'github_url' => null,
|
||||
'date_completed' => '2025-06-01',
|
||||
'is_featured' => false,
|
||||
'display_order' => 3,
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($projects as $project) {
|
||||
Project::create($project);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user