Files
citrus/database/seeders/LogosPageSeeder.php

42 lines
1.1 KiB
PHP
Raw Permalink 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 LogosPageSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$author = User::first();
if (!$author) return;
$corporate = Page::where('slug', 'kurumsal')->first();
if (!$corporate) return;
Page::updateOrCreate(
['slug' => 'logolarimiz'],
[
'author_id' => $author->id,
'parent_id' => $corporate->id,
'title' => 'Logolarımız',
'excerpt' => 'Kurumsal logolarımız ve kullanım standartları',
'content' => null,
'template' => 'corporate.logos',
'status' => 'published',
'is_homepage' => false,
'show_in_menu' => true,
'sort_order' => 6,
'published_at' => now(),
]
);
$this->command->info('✅ Logolarımız sayfası başarıyla eklendi!');
}
}