feat: add Trunçgil Akademi page template and automated seeder for course offerings
This commit is contained in:
@@ -21,6 +21,7 @@ class DatabaseSeeder extends Seeder
|
||||
WebDevelopmentPageSeeder::class,
|
||||
AppDevelopmentPageSeeder::class,
|
||||
YapayZekaPageSeeder::class,
|
||||
TruncgilAkademiPageSeeder::class,
|
||||
SiteTranslationsSeeder::class,
|
||||
CompanyHistoryItemSeeder::class,
|
||||
DekupaiProductSeeder::class,
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Page;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class TruncgilAkademiPageSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$author = User::query()->first();
|
||||
if (!$author) {
|
||||
$this->command?->warn('Kullanıcı bulunamadı, seeder atlandı.');
|
||||
return;
|
||||
}
|
||||
|
||||
$corporate = Page::where('slug', 'kurumsal')->first();
|
||||
|
||||
Page::updateOrCreate(
|
||||
['slug' => 'truncgil-akademi'],
|
||||
[
|
||||
'author_id' => $author->id,
|
||||
'parent_id' => $corporate?->id,
|
||||
'title' => 'Trunçgil Akademi',
|
||||
'excerpt' => 'Trunçgil Akademi uzman kadrosuyla web uygulamaları, yapay zeka, Vibe Coding ve müzik prodüksiyonu gibi geleceğin popüler alanlarında profesyonel eğitimler sunar.',
|
||||
'content' => '',
|
||||
'template' => 'services.truncgil-akademi',
|
||||
'featured_image' => null,
|
||||
'custom_header_blade' => 'partials.header-truncgil-akademi',
|
||||
'status' => 'published',
|
||||
'is_homepage' => false,
|
||||
'show_in_menu' => true,
|
||||
'sort_order' => 20,
|
||||
'published_at' => now(),
|
||||
'meta_title' => 'Trunçgil Akademi | Geleceğin Teknolojileri ve Eğitimleri',
|
||||
'meta_description' => 'Trunçgil Akademi ile Vibe Coding, Yapay Zeka, Web Uygulama Geliştirme ve Müzik Prodüksiyonu eğitimleri. Uzmanından uygulamalı ve modern müfredat.',
|
||||
]
|
||||
);
|
||||
|
||||
$this->command?->info('✅ Trunçgil Akademi sayfası başarıyla oluşturuldu.');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user