Files
citrus/database/seeders/TruncgilAkademiPageSeeder.php
T

45 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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.');
}
}