45 lines
1.7 KiB
PHP
45 lines
1.7 KiB
PHP
<?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.');
|
||
}
|
||
}
|