42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?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!');
|
||
}
|
||
}
|