152 lines
7.0 KiB
PHP
152 lines
7.0 KiB
PHP
<?php
|
||
|
||
namespace Database\Seeders\Website;
|
||
|
||
use App\Models\Website\AboutMe;
|
||
use App\Models\Website\AboutMeTranslation;
|
||
use App\Models\Website\Skill;
|
||
use App\Models\Website\SkillTranslation;
|
||
use Illuminate\Database\Seeder;
|
||
|
||
class AboutMeSeeder extends Seeder
|
||
{
|
||
/**
|
||
* Run the database seeds.
|
||
*/
|
||
public function run()
|
||
{
|
||
// ایجاد رکورد AboutMe بدون ترجمه
|
||
$aboutMe = AboutMe::create([
|
||
'image' => '/images/profile.png',
|
||
]);
|
||
|
||
// ایجاد ترجمه انگلیسی
|
||
AboutMeTranslation::create([
|
||
'about_me_id' => $aboutMe->id,
|
||
'locale' => 'en',
|
||
'title' => 'About Me',
|
||
'description' => 'I am a web developer with over 10 years of experience in creating dynamic and user-centric web applications. Specializing in React and Next.js, I build scalable solutions that enhance performance and user experience. I enjoy tackling complex challenges, from improving legacy systems to developing new applications. My focus on frontend development and seamless backend integration allows me to deliver innovative results while staying current with industry trends.',
|
||
]);
|
||
|
||
// ایجاد ترجمه فارسی
|
||
AboutMeTranslation::create([
|
||
'about_me_id' => $aboutMe->id,
|
||
'locale' => 'fa',
|
||
'title' => 'درباره من',
|
||
'description' => 'من یک توسعهدهنده وب با بیش از 10 سال تجربه در ایجاد برنامههای وب پویا و کاربرمحور هستم. با تخصص در React و Next.js، راهحلهای مقیاسپذیری ایجاد میکنم که عملکرد و تجربه کاربری را بهبود میبخشند. من از حل چالشهای پیچیده لذت میبرم، از بهبود سیستمهای قدیمی گرفته تا توسعه برنامههای جدید. تمرکز من بر توسعه فرانتاند و یکپارچهسازی بیدردسر با بکاند به من این امکان را میدهد که نتایج نوآورانهای ارائه دهم و همزمان با روندهای صنعت بهروز باشم.',
|
||
]);
|
||
|
||
// ایجاد رکوردهای Skill و ترجمههای انگلیسی و فارسی
|
||
|
||
// HTML & CSS (SASS, Responsive Design)
|
||
$htmlSkill = Skill::create([
|
||
'about_me_id' => $aboutMe->id,
|
||
'image' => '/images/frontend.png',
|
||
'percentage' => 95,
|
||
'link' => 'http://example.com/frontend',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $htmlSkill->id,
|
||
'locale' => 'en',
|
||
'title' => 'HTML & CSS (SASS, Responsive Design)',
|
||
'description' => 'Skilled in HTML5, CSS3, including SASS for modular and maintainable stylesheets. Experienced in building responsive web designs.',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $htmlSkill->id,
|
||
'locale' => 'fa',
|
||
'title' => 'HTML و CSS (SASS، طراحی واکنشگرا)',
|
||
'description' => 'مهارت در HTML5، CSS3، شامل SASS برای ساخت استایلهای مدولار و قابل نگهداری. تجربه در طراحی وبسایتهای واکنشگرا.',
|
||
]);
|
||
|
||
// React.js and Next.js Development
|
||
$reactSkill = Skill::create([
|
||
'about_me_id' => $aboutMe->id,
|
||
'image' => '/images/backend.png',
|
||
'percentage' => 90,
|
||
'link' => 'http://example.com/backend',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $reactSkill->id,
|
||
'locale' => 'en',
|
||
'title' => 'React.js and Next.js Development',
|
||
'description' => 'Extensive experience in React.js and Next.js for building scalable and performant web applications.',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $reactSkill->id,
|
||
'locale' => 'fa',
|
||
'title' => 'توسعه React.js و Next.js',
|
||
'description' => 'تجربه گسترده در توسعه React.js و Next.js برای ساخت برنامههای وب مقیاسپذیر و پرکاربرد.',
|
||
]);
|
||
|
||
// Backend Development (RESTful APIs, Laravel)
|
||
$backendSkill = Skill::create([
|
||
'about_me_id' => $aboutMe->id,
|
||
'image' => '/images/ui.png',
|
||
'percentage' => 85,
|
||
'link' => 'http://example.com/ui',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $backendSkill->id,
|
||
'locale' => 'en',
|
||
'title' => 'Backend Development (RESTful APIs, Laravel)',
|
||
'description' => 'Proficient in backend development, building robust RESTful APIs using Laravel and other technologies.',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $backendSkill->id,
|
||
'locale' => 'fa',
|
||
'title' => 'توسعه بکاند (APIهای RESTful، لاراول)',
|
||
'description' => 'تسلط به توسعه بکاند و ساخت APIهای RESTful با استفاده از لاراول و دیگر تکنولوژیها.',
|
||
]);
|
||
|
||
// WordPress Development and Customization
|
||
$wordpressSkill = Skill::create([
|
||
'about_me_id' => $aboutMe->id,
|
||
'image' => '/images/ux.png',
|
||
'percentage' => 90,
|
||
'link' => 'http://example.com/ux',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $wordpressSkill->id,
|
||
'locale' => 'en',
|
||
'title' => 'WordPress Development and Customization',
|
||
'description' => 'Skilled in WordPress development, including theme customization and plugin development.',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $wordpressSkill->id,
|
||
'locale' => 'fa',
|
||
'title' => 'توسعه و شخصیسازی وردپرس',
|
||
'description' => 'مهارت در توسعه وردپرس، شامل شخصیسازی قالبها و توسعه افزونهها.',
|
||
]);
|
||
|
||
// Version Control (Git, GitHub)
|
||
$gitSkill = Skill::create([
|
||
'about_me_id' => $aboutMe->id,
|
||
'image' => '/images/ux.png',
|
||
'percentage' => 80,
|
||
'link' => 'http://example.com/ux',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $gitSkill->id,
|
||
'locale' => 'en',
|
||
'title' => 'Version Control (Git, GitHub)',
|
||
'description' => 'Experienced in version control using Git and GitHub for managing codebases and collaboration.',
|
||
]);
|
||
|
||
SkillTranslation::create([
|
||
'skill_id' => $gitSkill->id,
|
||
'locale' => 'fa',
|
||
'title' => 'کنترل نسخه (Git, GitHub)',
|
||
'description' => 'تجربه در کنترل نسخه با استفاده از Git و GitHub برای مدیریت کدها و همکاری تیمی.',
|
||
]);
|
||
}
|
||
}
|