97 lines
4.7 KiB
PHP
97 lines
4.7 KiB
PHP
<?php
|
||
|
||
namespace Database\Seeders\Website;
|
||
|
||
use Illuminate\Database\Seeder;
|
||
use App\Models\Website\Service;
|
||
use App\Models\Website\ServiceTranslation;
|
||
|
||
class ServiceSeeder extends Seeder
|
||
{
|
||
/**
|
||
* Run the database seeds.
|
||
*/
|
||
public function run()
|
||
{
|
||
// خدمات با ترجمههای فارسی
|
||
$services = [
|
||
[
|
||
'imageSrc' => '/images/ui-ux-vector.svg',
|
||
'translations' => [
|
||
[
|
||
'locale' => '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.',
|
||
],
|
||
],
|
||
],
|
||
[
|
||
'imageSrc' => '/images/web-design-vector.svg',
|
||
'translations' => [
|
||
[
|
||
'locale' => '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.',
|
||
],
|
||
],
|
||
],
|
||
[
|
||
'imageSrc' => '/images/app-design-vector.svg',
|
||
'translations' => [
|
||
[
|
||
'locale' => '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.',
|
||
],
|
||
],
|
||
],
|
||
[
|
||
'imageSrc' => '/images/graphic-design-vector.svg',
|
||
'translations' => [
|
||
[
|
||
'locale' => '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.',
|
||
],
|
||
],
|
||
],
|
||
];
|
||
|
||
// ذخیره خدمات و ترجمهها
|
||
foreach ($services as $serviceData) {
|
||
$service = Service::create([
|
||
'imageSrc' => $serviceData['imageSrc'],
|
||
]);
|
||
|
||
foreach ($serviceData['translations'] as $translation) {
|
||
ServiceTranslation::create([
|
||
'service_id' => $service->id,
|
||
'locale' => $translation['locale'],
|
||
'title' => $translation['title'],
|
||
'description' => $translation['description'],
|
||
]);
|
||
}
|
||
}
|
||
}
|
||
}
|