6.1-6.2: fix seeders for spatie translatable, uncomment ProjectSeeder, order correctly
This commit is contained in:
parent
9ff5b93157
commit
78a14646eb
@ -24,13 +24,11 @@ public function run(): void
|
|||||||
'email' => 'ceo@parsaaghayi.ir',
|
'email' => 'ceo@parsaaghayi.ir',
|
||||||
]);
|
]);
|
||||||
$this->call([
|
$this->call([
|
||||||
AboutMeSeeder::class,
|
|
||||||
// ProjectSeeder::class,
|
|
||||||
ProjectCategorySeeder::class,
|
ProjectCategorySeeder::class,
|
||||||
|
AboutMeSeeder::class,
|
||||||
ProjectSeeder::class,
|
ProjectSeeder::class,
|
||||||
ServiceSeeder::class,
|
ServiceSeeder::class,
|
||||||
BlogSeeder::class
|
BlogSeeder::class,
|
||||||
// دیگر seeders
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,149 +3,65 @@
|
|||||||
namespace Database\Seeders\Website;
|
namespace Database\Seeders\Website;
|
||||||
|
|
||||||
use App\Models\Website\AboutMe;
|
use App\Models\Website\AboutMe;
|
||||||
use App\Models\Website\AboutMeTranslation;
|
|
||||||
use App\Models\Website\Skill;
|
use App\Models\Website\Skill;
|
||||||
use App\Models\Website\SkillTranslation;
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
class AboutMeSeeder extends Seeder
|
class AboutMeSeeder extends Seeder
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Run the database seeds.
|
|
||||||
*/
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
// ایجاد رکورد AboutMe بدون ترجمه
|
|
||||||
$aboutMe = AboutMe::create([
|
$aboutMe = AboutMe::create([
|
||||||
'image' => '/images/profile.png',
|
'image' => '/images/profile.png',
|
||||||
|
'title' => [
|
||||||
|
'en' => 'About Me',
|
||||||
|
'fa' => 'درباره من',
|
||||||
|
],
|
||||||
|
'description' => [
|
||||||
|
'en' => '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.',
|
||||||
|
'fa' => 'من یک توسعهدهنده وب با بیش از 10 سال تجربه در ایجاد برنامههای وب پویا و کاربرمحور هستم. با تخصص در React و Next.js، راهحلهای مقیاسپذیری ایجاد میکنم که عملکرد و تجربه کاربری را بهبود میبخشند. من از حل چالشهای پیچیده لذت میبرم، از بهبود سیستمهای قدیمی گرفته تا توسعه برنامههای جدید. تمرکز من بر توسعه فرانتاند و یکپارچهسازی بیدردسر با بکاند به من این امکان را میدهد که نتایج نوآورانهای ارائه دهم و همزمان با روندهای صنعت بهروز باشم.',
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// ایجاد ترجمه انگلیسی
|
$skills = [
|
||||||
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',
|
'image' => '/images/frontend.png',
|
||||||
'percentage' => 95,
|
'percentage' => 95,
|
||||||
'link' => 'http://example.com/frontend',
|
'link' => 'http://example.com/frontend',
|
||||||
]);
|
'title' => ['en' => 'HTML & CSS (SASS, Responsive Design)', 'fa' => 'HTML و CSS (SASS، طراحی واکنشگرا)'],
|
||||||
|
'description' => ['en' => 'Skilled in HTML5, CSS3, including SASS for modular and maintainable stylesheets. Experienced in building responsive web designs.', 'fa' => 'مهارت در HTML5، CSS3، شامل SASS برای ساخت استایلهای مدولار و قابل نگهداری. تجربه در طراحی وبسایتهای واکنشگرا.'],
|
||||||
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',
|
'image' => '/images/backend.png',
|
||||||
'percentage' => 90,
|
'percentage' => 90,
|
||||||
'link' => 'http://example.com/backend',
|
'link' => 'http://example.com/backend',
|
||||||
]);
|
'title' => ['en' => 'React.js and Next.js Development', 'fa' => 'توسعه React.js و Next.js'],
|
||||||
|
'description' => ['en' => 'Extensive experience in React.js and Next.js for building scalable and performant web applications.', 'fa' => 'تجربه گسترده در توسعه React.js و Next.js برای ساخت برنامههای وب مقیاسپذیر و پرکاربرد.'],
|
||||||
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',
|
'image' => '/images/ui.png',
|
||||||
'percentage' => 85,
|
'percentage' => 85,
|
||||||
'link' => 'http://example.com/ui',
|
'link' => 'http://example.com/ui',
|
||||||
]);
|
'title' => ['en' => 'Backend Development (RESTful APIs, Laravel)', 'fa' => 'توسعه بکاند (APIهای RESTful، لاراول)'],
|
||||||
|
'description' => ['en' => 'Proficient in backend development, building robust RESTful APIs using Laravel and other technologies.', 'fa' => 'تسلط به توسعه بکاند و ساخت APIهای RESTful با استفاده از لاراول و دیگر تکنولوژیها.'],
|
||||||
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',
|
'image' => '/images/ux.png',
|
||||||
'percentage' => 90,
|
'percentage' => 90,
|
||||||
'link' => 'http://example.com/ux',
|
'link' => 'http://example.com/ux',
|
||||||
]);
|
'title' => ['en' => 'WordPress Development and Customization', 'fa' => 'توسعه و شخصیسازی وردپرس'],
|
||||||
|
'description' => ['en' => 'Skilled in WordPress development, including theme customization and plugin development.', 'fa' => 'مهارت در توسعه وردپرس، شامل شخصیسازی قالبها و توسعه افزونهها.'],
|
||||||
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',
|
'image' => '/images/ux.png',
|
||||||
'percentage' => 80,
|
'percentage' => 80,
|
||||||
'link' => 'http://example.com/ux',
|
'link' => 'http://example.com/ux',
|
||||||
]);
|
'title' => ['en' => 'Version Control (Git, GitHub)', 'fa' => 'کنترل نسخه (Git, GitHub)'],
|
||||||
|
'description' => ['en' => 'Experienced in version control using Git and GitHub for managing codebases and collaboration.', 'fa' => 'تجربه در کنترل نسخه با استفاده از Git و GitHub برای مدیریت کدها و همکاری تیمی.'],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
SkillTranslation::create([
|
foreach ($skills as $skillData) {
|
||||||
'skill_id' => $gitSkill->id,
|
$aboutMe->skills()->create($skillData);
|
||||||
'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 برای مدیریت کدها و همکاری تیمی.',
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,37 +4,39 @@
|
|||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use App\Models\Website\ProjectCategory;
|
use App\Models\Website\ProjectCategory;
|
||||||
use App\Models\Website\ProjectCategoryTranslation;
|
|
||||||
|
|
||||||
class ProjectCategorySeeder extends Seeder
|
class ProjectCategorySeeder extends Seeder
|
||||||
{
|
{
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$categories = [
|
$categories = [
|
||||||
['fa' => 'طراحی اپلیکیشن', 'en' => 'App Design'],
|
[
|
||||||
['fa' => 'فرانت اند', 'en' => 'Front End'],
|
'title' => ['en' => 'App Design', 'fa' => 'طراحی اپلیکیشن'],
|
||||||
['fa' => 'بک اند', 'en' => 'Backend'],
|
'description' => ['en' => 'Description for App Design', 'fa' => 'توضیحات طراحی اپلیکیشن'],
|
||||||
['fa' => 'طراحی وب', 'en' => 'Web Design'],
|
],
|
||||||
['fa' => 'طراحی گرافیک', 'en' => 'Graphic Design'],
|
[
|
||||||
|
'title' => ['en' => 'Front End', 'fa' => 'فرانت اند'],
|
||||||
|
'description' => ['en' => 'Description for Front End', 'fa' => 'توضیحات فرانت اند'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => ['en' => 'Backend', 'fa' => 'بک اند'],
|
||||||
|
'description' => ['en' => 'Description for Backend', 'fa' => 'توضیحات بک اند'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => ['en' => 'Web Design', 'fa' => 'طراحی وب'],
|
||||||
|
'description' => ['en' => 'Description for Web Design', 'fa' => 'توضیحات طراحی وب'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => ['en' => 'Graphic Design', 'fa' => 'طراحی گرافیک'],
|
||||||
|
'description' => ['en' => 'Description for Graphic Design', 'fa' => 'توضیحات طراحی گرافیک'],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($categories as $key => $category) {
|
foreach ($categories as $key => $category) {
|
||||||
// ایجاد دستهبندی اصلی
|
ProjectCategory::create([
|
||||||
$createdCategory = ProjectCategory::create(['image' => 'category' . ($key + 1) . '.jpg']);
|
'image' => 'category' . ($key + 1) . '.jpg',
|
||||||
|
'title' => $category['title'],
|
||||||
// ایجاد ترجمهها
|
'description' => $category['description'],
|
||||||
ProjectCategoryTranslation::create([
|
|
||||||
'category_id' => $createdCategory->id,
|
|
||||||
'locale' => 'fa',
|
|
||||||
'title' => $category['fa'],
|
|
||||||
'description' => 'توضیحات ' . $category['fa'],
|
|
||||||
]);
|
|
||||||
|
|
||||||
ProjectCategoryTranslation::create([
|
|
||||||
'category_id' => $createdCategory->id,
|
|
||||||
'locale' => 'en',
|
|
||||||
'title' => $category['en'],
|
|
||||||
'description' => 'Description for ' . $category['en'],
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,41 +4,30 @@
|
|||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use App\Models\Website\Project;
|
use App\Models\Website\Project;
|
||||||
use App\Models\Website\ProjectTranslation;
|
|
||||||
use App\Models\Website\ProjectCategory;
|
use App\Models\Website\ProjectCategory;
|
||||||
|
|
||||||
class ProjectSeeder extends Seeder
|
class ProjectSeeder extends Seeder
|
||||||
{
|
{
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
// دریافت تمام دستهبندیها
|
|
||||||
$categories = ProjectCategory::all();
|
$categories = ProjectCategory::all();
|
||||||
|
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
// ایجاد تعداد تصادفی پروژه برای هر دستهبندی
|
|
||||||
$projectCount = rand(5, 10);
|
$projectCount = rand(5, 10);
|
||||||
|
|
||||||
for ($i = 1; $i <= $projectCount; $i++) {
|
for ($i = 1; $i <= $projectCount; $i++) {
|
||||||
// ایجاد پروژه جدید
|
Project::create([
|
||||||
$project = Project::create([
|
|
||||||
'category_id' => $category->id,
|
'category_id' => $category->id,
|
||||||
'image1' => 'project' . $i . '_image1.jpg',
|
'image1' => 'project' . $i . '_image1.jpg',
|
||||||
'image2' => 'project' . $i . '_image2.jpg'
|
'image2' => 'project' . $i . '_image2.jpg',
|
||||||
]);
|
'title' => [
|
||||||
|
'en' => 'Project ' . $i . ' - ' . $category->getTranslation('title', 'en'),
|
||||||
// ایجاد ترجمهها
|
'fa' => 'پروژه ' . $i . ' - ' . $category->getTranslation('title', 'fa'),
|
||||||
ProjectTranslation::create([
|
],
|
||||||
'project_id' => $project->id,
|
'description' => [
|
||||||
'locale' => 'fa',
|
'en' => 'Description for project ' . $i . ' in category ' . $category->getTranslation('title', 'en'),
|
||||||
'title' => 'پروژه ' . $i . ' - ' . $category->translations()->where('locale', 'fa')->first()->title,
|
'fa' => 'توضیحات پروژه ' . $i . ' برای دستهبندی ' . $category->getTranslation('title', 'fa'),
|
||||||
'description' => 'توضیحات پروژه ' . $i . ' برای دستهبندی ' . $category->translations()->where('locale', 'fa')->first()->title,
|
],
|
||||||
]);
|
|
||||||
|
|
||||||
ProjectTranslation::create([
|
|
||||||
'project_id' => $project->id,
|
|
||||||
'locale' => 'en',
|
|
||||||
'title' => 'Project ' . $i . ' - ' . $category->translations()->where('locale', 'en')->first()->title,
|
|
||||||
'description' => 'Description for project ' . $i . ' in category ' . $category->translations()->where('locale', 'en')->first()->title,
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,93 +4,60 @@
|
|||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use App\Models\Website\Service;
|
use App\Models\Website\Service;
|
||||||
use App\Models\Website\ServiceTranslation;
|
|
||||||
|
|
||||||
class ServiceSeeder extends Seeder
|
class ServiceSeeder extends Seeder
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Run the database seeds.
|
|
||||||
*/
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
// خدمات با ترجمههای فارسی
|
|
||||||
$services = [
|
$services = [
|
||||||
[
|
[
|
||||||
'imageSrc' => '/images/ui-ux-vector.svg',
|
'imageSrc' => '/images/ui-ux-vector.svg',
|
||||||
'translations' => [
|
'title' => [
|
||||||
[
|
'en' => 'Custom Web Development',
|
||||||
'locale' => 'fa',
|
'fa' => 'توسعه وب سفارشی',
|
||||||
'title' => 'توسعه وب سفارشی',
|
|
||||||
'description' => 'ما برنامههای وب سفارشی را ایجاد میکنیم که نیازهای خاص کسبوکار شما را برآورده میسازد و از آخرین تکنولوژیها برای عملکرد بهینه استفاده میکند.',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'locale' => 'en',
|
|
||||||
'title' => 'Custom Web Development',
|
|
||||||
'description' => 'We create tailored web applications that meet your unique business requirements, utilizing the latest technologies for optimal performance.',
|
|
||||||
],
|
],
|
||||||
|
'description' => [
|
||||||
|
'en' => 'We create tailored web applications that meet your unique business requirements, utilizing the latest technologies for optimal performance.',
|
||||||
|
'fa' => 'ما برنامههای وب سفارشی را ایجاد میکنیم که نیازهای خاص کسبوکار شما را برآورده میسازد و از آخرین تکنولوژیها برای عملکرد بهینه استفاده میکند.',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'imageSrc' => '/images/web-design-vector.svg',
|
'imageSrc' => '/images/web-design-vector.svg',
|
||||||
'translations' => [
|
'title' => [
|
||||||
[
|
'en' => 'Frontend Development',
|
||||||
'locale' => 'fa',
|
'fa' => 'توسعه فرانتاند',
|
||||||
'title' => 'توسعه فرانتاند',
|
|
||||||
'description' => 'خدمات توسعه فرانتاند ما بر روی ایجاد رابطهای کاربری جذاب و پاسخگو تمرکز دارد که تجربه کاربری را در تمامی دستگاهها بهبود میبخشد.',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'locale' => 'en',
|
|
||||||
'title' => 'Frontend Development',
|
|
||||||
'description' => 'Our frontend development services focus on crafting engaging, responsive user interfaces that enhance user experience across all devices.',
|
|
||||||
],
|
],
|
||||||
|
'description' => [
|
||||||
|
'en' => 'Our frontend development services focus on crafting engaging, responsive user interfaces that enhance user experience across all devices.',
|
||||||
|
'fa' => 'خدمات توسعه فرانتاند ما بر روی ایجاد رابطهای کاربری جذاب و پاسخگو تمرکز دارد که تجربه کاربری را در تمامی دستگاهها بهبود میبخشد.',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'imageSrc' => '/images/app-design-vector.svg',
|
'imageSrc' => '/images/app-design-vector.svg',
|
||||||
'translations' => [
|
'title' => [
|
||||||
[
|
'en' => 'Backend Development',
|
||||||
'locale' => 'fa',
|
'fa' => 'توسعه بکاند',
|
||||||
'title' => 'توسعه بکاند',
|
|
||||||
'description' => 'ما راهحلهای قابل اعتماد توسعه بکاند را ارائه میدهیم و معماریهای سروری و APIهای قوی را برای اطمینان از عملکرد روان و ایمن برنامه ایجاد میکنیم.',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'locale' => 'en',
|
|
||||||
'title' => 'Backend Development',
|
|
||||||
'description' => 'We provide reliable backend development solutions, building robust server-side architectures and APIs to ensure smooth and secure application functionality.',
|
|
||||||
],
|
],
|
||||||
|
'description' => [
|
||||||
|
'en' => 'We provide reliable backend development solutions, building robust server-side architectures and APIs to ensure smooth and secure application functionality.',
|
||||||
|
'fa' => 'ما راهحلهای قابل اعتماد توسعه بکاند را ارائه میدهیم و معماریهای سروری و APIهای قوی را برای اطمینان از عملکرد روان و ایمن برنامه ایجاد میکنیم.',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'imageSrc' => '/images/graphic-design-vector.svg',
|
'imageSrc' => '/images/graphic-design-vector.svg',
|
||||||
'translations' => [
|
'title' => [
|
||||||
[
|
'en' => 'Website Maintenance and Support',
|
||||||
'locale' => 'fa',
|
'fa' => 'نگهداری و پشتیبانی وبسایت',
|
||||||
'title' => 'نگهداری و پشتیبانی وبسایت',
|
|
||||||
'description' => 'خدمات نگهداری و پشتیبانی مداوم ما وبسایت شما را بهروز، امن و با بهترین عملکرد نگه میدارد تا شما بتوانید بر روی کسبوکار اصلی خود تمرکز کنید.',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'locale' => 'en',
|
|
||||||
'title' => 'Website Maintenance and Support',
|
|
||||||
'description' => 'Our ongoing maintenance and support services keep your website updated, secure, and performing at its best, allowing you to focus on your core business.',
|
|
||||||
],
|
],
|
||||||
|
'description' => [
|
||||||
|
'en' => 'Our ongoing maintenance and support services keep your website updated, secure, and performing at its best, allowing you to focus on your core business.',
|
||||||
|
'fa' => 'خدمات نگهداری و پشتیبانی مداوم ما وبسایت شما را بهروز، امن و با بهترین عملکرد نگه میدارد تا شما بتوانید بر روی کسبوکار اصلی خود تمرکز کنید.',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
// ذخیره خدمات و ترجمهها
|
|
||||||
foreach ($services as $serviceData) {
|
foreach ($services as $serviceData) {
|
||||||
$service = Service::create([
|
Service::create($serviceData);
|
||||||
'imageSrc' => $serviceData['imageSrc'],
|
|
||||||
]);
|
|
||||||
|
|
||||||
foreach ($serviceData['translations'] as $translation) {
|
|
||||||
ServiceTranslation::create([
|
|
||||||
'service_id' => $service->id,
|
|
||||||
'locale' => $translation['locale'],
|
|
||||||
'title' => $translation['title'],
|
|
||||||
'description' => $translation['description'],
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user