Add sections and data fields to Page model, create migration for sections column, and implement PageSeeder for initial page data: Enhanced the Page model with new fields for sections and data, added a migration to include a JSON column for sections in the pages table, and created a PageSeeder to populate the database with example pages including structured sections for content management.
This commit is contained in:
@@ -27,6 +27,8 @@ class Page extends Model
|
||||
'template',
|
||||
'is_homepage',
|
||||
'show_in_menu',
|
||||
'sections',
|
||||
'data',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -45,6 +47,8 @@ class Page extends Model
|
||||
'is_homepage' => 'boolean',
|
||||
'show_in_menu' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
'sections' => 'array',
|
||||
'data' => 'array',
|
||||
];
|
||||
|
||||
public function author()
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('pages', function (Blueprint $table) {
|
||||
// JSON kolonu: Sayfa blokları (hero, features, pricing, cta vb.)
|
||||
$table->json('sections')->nullable()->after('content');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('pages', function (Blueprint $table) {
|
||||
$table->dropColumn('sections');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -13,9 +13,10 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// Settings seed
|
||||
// Settings & Pages seed
|
||||
$this->call([
|
||||
SettingSeeder::class,
|
||||
PageSeeder::class,
|
||||
]);
|
||||
|
||||
// User::factory(10)->create();
|
||||
|
||||
@@ -0,0 +1,316 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Page;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class PageSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// İlk kullanıcıyı bul veya oluştur (author_id için gerekli)
|
||||
$author = \App\Models\User::first();
|
||||
if (!$author) {
|
||||
$author = \App\Models\User::create([
|
||||
'name' => 'Admin',
|
||||
'email' => 'admin@truncgil.com',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
}
|
||||
|
||||
$pages = [
|
||||
// Home Page
|
||||
[
|
||||
'author_id' => $author->id,
|
||||
'title' => 'Anasayfa',
|
||||
'slug' => 'home',
|
||||
'excerpt' => 'Modern ve yenilikçi teknoloji çözümleri',
|
||||
'content' => null,
|
||||
'template' => 'home',
|
||||
'status' => 'published',
|
||||
'is_homepage' => true,
|
||||
'show_in_menu' => true,
|
||||
'sort_order' => 1,
|
||||
'published_at' => now(),
|
||||
'meta_title' => 'Truncgil Citrus - Modern Web Çözümleri',
|
||||
'meta_description' => 'Yenilikçi teknoloji çözümleri ile geleceği şekillendiriyoruz. Modern web uygulamaları ve dijital dönüşüm hizmetleri.',
|
||||
'sections' => [
|
||||
[
|
||||
'type' => 'hero',
|
||||
'data' => [
|
||||
'background_image' => 'assets/img/photos/blurry.png',
|
||||
'badge' => 'YENİ PLATFORM',
|
||||
'title' => 'Modern ve Çok Amaçlı <span class="text-[#e31e24]">Web Çözümleri</span>',
|
||||
'subtitle' => 'Yenilikçi teknoloji çözümleri ile geleceği şekillendiriyoruz. Projelerinizi en son teknolojilerle hayata geçiriyoruz.',
|
||||
'primary_button_text' => 'Hemen Başla',
|
||||
'primary_button_url' => '#features',
|
||||
'secondary_button_text' => 'Daha Fazla Bilgi',
|
||||
'secondary_button_url' => '/about',
|
||||
'hero_image' => 'assets/img/demos/f1.png',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'features',
|
||||
'data' => [
|
||||
'bg_class' => '!bg-[#f0f0f8]',
|
||||
'section_badge' => 'ÖZELLİKLER',
|
||||
'section_title' => 'Neden Truncgil Citrus?',
|
||||
'section_subtitle' => 'Modern teknolojiler ve uzman ekibimizle projelerinizi hayata geçiriyoruz',
|
||||
'column_class' => 'md:w-6/12 lg:w-4/12',
|
||||
'features' => [
|
||||
[
|
||||
'icon' => 'assets/img/demos/fi1.png',
|
||||
'title' => 'Hızlı Çözümler',
|
||||
'description' => 'Modern teknolojiler kullanarak projelerinizi hızlı ve verimli bir şekilde hayata geçiriyoruz.',
|
||||
],
|
||||
[
|
||||
'icon' => 'assets/img/demos/fi2.png',
|
||||
'title' => 'Güvenli Altyapı',
|
||||
'description' => 'En son güvenlik standartlarını kullanarak verilerinizi koruma altına alıyoruz.',
|
||||
],
|
||||
[
|
||||
'icon' => 'assets/img/demos/fi3.png',
|
||||
'title' => 'Uzman Ekip',
|
||||
'description' => 'Deneyimli ve uzman ekibimiz ile her zaman yanınızdayız.',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'stats',
|
||||
'data' => [
|
||||
'bg_class' => '!bg-[#ffffff]',
|
||||
'column_class' => 'md:w-6/12 lg:w-3/12',
|
||||
'stats' => [
|
||||
['number' => '500+', 'label' => 'Tamamlanan Proje'],
|
||||
['number' => '300+', 'label' => 'Mutlu Müşteri'],
|
||||
['number' => '50+', 'label' => 'Kazanılan Ödül'],
|
||||
['number' => '25+', 'label' => 'Ekip Üyesi'],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'cta',
|
||||
'data' => [
|
||||
'bg_class' => 'overflow-hidden',
|
||||
'background_image' => 'assets/img/photos/blurry.png',
|
||||
'icon' => 'assets/img/demos/icon-grape.png',
|
||||
'title' => 'Benzersiz düşünün ve <span class="text-[#e31e24]">fark yaratın</span>',
|
||||
'subtitle' => 'Binlerce müşterimiz tarafından güveniliyoruz. Siz de katılın ve projelerinizi hayata geçirin.',
|
||||
'button_text' => 'İletişime Geç',
|
||||
'button_url' => '/contact',
|
||||
'button_icon' => 'uil uil-arrow-up-right',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
// About Page
|
||||
[
|
||||
'author_id' => $author->id,
|
||||
'title' => 'Hakkımızda',
|
||||
'slug' => 'about',
|
||||
'excerpt' => 'Truncgil Citrus olarak yenilikçi teknoloji çözümleri sunuyoruz',
|
||||
'content' => null,
|
||||
'template' => 'generic',
|
||||
'status' => 'published',
|
||||
'is_homepage' => false,
|
||||
'show_in_menu' => true,
|
||||
'sort_order' => 2,
|
||||
'published_at' => now(),
|
||||
'meta_title' => 'Hakkımızda - Truncgil Citrus',
|
||||
'meta_description' => 'Truncgil Citrus olarak yenilikçi teknoloji çözümleri sunuyor, dijital dönüşüm süreçlerinizde yanınızdayız.',
|
||||
'sections' => [
|
||||
[
|
||||
'type' => 'hero',
|
||||
'data' => [
|
||||
'badge' => 'HAKKIMIZDA',
|
||||
'title' => 'Yenilikçi Teknoloji <span class="text-[#e31e24]">Çözümleri</span>',
|
||||
'subtitle' => '2010 yılından bu yana dijital dönüşüm süreçlerinde lider konumdayız',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'features',
|
||||
'data' => [
|
||||
'bg_class' => '!bg-[#ffffff]',
|
||||
'section_title' => 'Değerlerimiz',
|
||||
'section_subtitle' => 'İş süreçlerimizi şekillendiren temel prensiplerimiz',
|
||||
'column_class' => 'md:w-6/12 lg:w-3/12',
|
||||
'features' => [
|
||||
['icon' => 'assets/img/demos/fi1.png', 'title' => 'İnovasyon', 'description' => 'Sürekli yenilik ve gelişim'],
|
||||
['icon' => 'assets/img/demos/fi2.png', 'title' => 'Kalite', 'description' => 'En yüksek standartlarda hizmet'],
|
||||
['icon' => 'assets/img/demos/fi3.png', 'title' => 'Güvenilirlik', 'description' => 'Zamanında ve eksiksiz teslimat'],
|
||||
['icon' => 'assets/img/demos/fi4.png', 'title' => 'Destek', 'description' => '7/24 müşteri desteği'],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
// Services Page
|
||||
[
|
||||
'author_id' => $author->id,
|
||||
'title' => 'Hizmetlerimiz',
|
||||
'slug' => 'services',
|
||||
'excerpt' => 'Geniş yelpazede teknoloji hizmetleri sunuyoruz',
|
||||
'content' => null,
|
||||
'template' => 'generic',
|
||||
'status' => 'published',
|
||||
'is_homepage' => false,
|
||||
'show_in_menu' => true,
|
||||
'sort_order' => 3,
|
||||
'published_at' => now(),
|
||||
'meta_title' => 'Hizmetlerimiz - Truncgil Citrus',
|
||||
'meta_description' => 'Web tasarım, mobil uygulama geliştirme, e-ticaret çözümleri ve dijital pazarlama hizmetlerimizi keşfedin.',
|
||||
'sections' => [
|
||||
[
|
||||
'type' => 'hero',
|
||||
'data' => [
|
||||
'badge' => 'HİZMETLER',
|
||||
'title' => 'Dijital Dönüşüm <span class="text-[#e31e24]">Çözümleri</span>',
|
||||
'subtitle' => 'İşinizi bir üst seviyeye taşıyacak teknoloji hizmetlerimiz',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'features',
|
||||
'data' => [
|
||||
'bg_class' => '!bg-[#f0f0f8]',
|
||||
'section_title' => 'Sunduğumuz Hizmetler',
|
||||
'column_class' => 'md:w-6/12 lg:w-4/12',
|
||||
'features' => [
|
||||
['icon' => 'assets/img/demos/fi1.png', 'title' => 'Web Tasarım & Geliştirme', 'description' => 'Modern, responsive ve SEO uyumlu web siteleri'],
|
||||
['icon' => 'assets/img/demos/fi2.png', 'title' => 'Mobil Uygulama', 'description' => 'iOS ve Android için native ve cross-platform uygulamalar'],
|
||||
['icon' => 'assets/img/demos/fi3.png', 'title' => 'E-Ticaret Çözümleri', 'description' => 'Entegre ödeme sistemleri ile online satış platformları'],
|
||||
['icon' => 'assets/img/demos/fi4.png', 'title' => 'Dijital Pazarlama', 'description' => 'SEO, SEM ve sosyal medya yönetimi'],
|
||||
['icon' => 'assets/img/demos/fi1.png', 'title' => 'Kurumsal Yazılım', 'description' => 'İşletmenize özel CRM, ERP ve özel yazılım çözümleri'],
|
||||
['icon' => 'assets/img/demos/fi2.png', 'title' => 'Bulut Hizmetleri', 'description' => 'Güvenli ve ölçeklenebilir bulut altyapısı'],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
// Contact Page
|
||||
[
|
||||
'author_id' => $author->id,
|
||||
'title' => 'İletişim',
|
||||
'slug' => 'contact',
|
||||
'excerpt' => 'Projeleriniz hakkında bizimle iletişime geçin',
|
||||
'content' => null,
|
||||
'template' => 'generic',
|
||||
'status' => 'published',
|
||||
'is_homepage' => false,
|
||||
'show_in_menu' => true,
|
||||
'sort_order' => 4,
|
||||
'published_at' => now(),
|
||||
'meta_title' => 'İletişim - Truncgil Citrus',
|
||||
'meta_description' => 'Projeleriniz hakkında konuşmak için bizimle iletişime geçin. Uzman ekibimiz size yardımcı olmaktan mutluluk duyar.',
|
||||
'sections' => [
|
||||
[
|
||||
'type' => 'hero',
|
||||
'data' => [
|
||||
'badge' => 'İLETİŞİM',
|
||||
'title' => 'Projelerinizi <span class="text-[#e31e24]">Konuşalım</span>',
|
||||
'subtitle' => 'Size özel çözümler geliştirmek için bizimle iletişime geçin',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'contact',
|
||||
'data' => [
|
||||
'bg_class' => '!bg-[#f0f0f8]',
|
||||
'title' => 'Bizimle İletişime Geçin',
|
||||
'subtitle' => 'Projeleriniz hakkında konuşmak için bize ulaşın',
|
||||
'info' => [
|
||||
'address' => 'Merkez Mah. Teknoloji Cad. No:123 İstanbul',
|
||||
'phone' => '+90 (212) 555 1234',
|
||||
'email' => 'info@truncgil.com',
|
||||
],
|
||||
'form_action' => '/contact/submit',
|
||||
'button_text' => 'Gönder',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
// Pricing Page (örnek)
|
||||
[
|
||||
'author_id' => $author->id,
|
||||
'title' => 'Fiyatlandırma',
|
||||
'slug' => 'pricing',
|
||||
'excerpt' => 'Size uygun paketi seçin',
|
||||
'content' => null,
|
||||
'template' => 'generic',
|
||||
'status' => 'published',
|
||||
'is_homepage' => false,
|
||||
'show_in_menu' => false,
|
||||
'sort_order' => 5,
|
||||
'published_at' => now(),
|
||||
'meta_title' => 'Fiyatlandırma - Truncgil Citrus',
|
||||
'meta_description' => 'İhtiyaçlarınıza uygun web tasarım ve yazılım geliştirme paketlerimizi inceleyin.',
|
||||
'sections' => [
|
||||
[
|
||||
'type' => 'hero',
|
||||
'data' => [
|
||||
'badge' => 'FİYATLANDIRMA',
|
||||
'title' => 'Size Uygun <span class="text-[#e31e24]">Paketi Seçin</span>',
|
||||
'subtitle' => 'Tüm paketler 30 gün para iade garantisi ile geliyor',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'pricing',
|
||||
'data' => [
|
||||
'bg_class' => '!bg-[#f0f0f8]',
|
||||
'section_title' => 'Web Tasarım Paketleri',
|
||||
'column_class' => 'md:w-6/12 lg:w-4/12',
|
||||
'featured_label' => 'Önerilen',
|
||||
'plans' => [
|
||||
[
|
||||
'name' => 'Başlangıç',
|
||||
'currency' => '₺',
|
||||
'price' => '999',
|
||||
'period' => 'ay',
|
||||
'features' => ['5 Sayfa', 'Mobil Uyumlu', 'SEO Optimizasyonu', '7/24 Destek'],
|
||||
'button_text' => 'Başla',
|
||||
'button_url' => '/contact',
|
||||
],
|
||||
[
|
||||
'name' => 'Profesyonel',
|
||||
'currency' => '₺',
|
||||
'price' => '2499',
|
||||
'period' => 'ay',
|
||||
'featured' => true,
|
||||
'features' => ['15 Sayfa', 'Mobil Uyumlu', 'SEO Optimizasyonu', 'Yönetim Paneli', '7/24 Öncelikli Destek'],
|
||||
'button_text' => 'Başla',
|
||||
'button_url' => '/contact',
|
||||
],
|
||||
[
|
||||
'name' => 'Kurumsal',
|
||||
'currency' => '₺',
|
||||
'price' => '4999',
|
||||
'period' => 'ay',
|
||||
'features' => ['Sınırsız Sayfa', 'Mobil Uyumlu', 'SEO Optimizasyonu', 'Gelişmiş Yönetim Paneli', 'Özel Entegrasyonlar', '7/24 Öncelikli Destek'],
|
||||
'button_text' => 'Başla',
|
||||
'button_url' => '/contact',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($pages as $pageData) {
|
||||
Page::updateOrCreate(
|
||||
['slug' => $pageData['slug']],
|
||||
$pageData
|
||||
);
|
||||
}
|
||||
|
||||
$this->command->info('✅ ' . count($pages) . ' sayfa başarıyla oluşturuldu!');
|
||||
}
|
||||
}
|
||||
@@ -525,10 +525,10 @@ class SettingSeeder extends Seeder
|
||||
[
|
||||
'key' => 'social_links',
|
||||
'value' => json_encode([
|
||||
'facebook' => '',
|
||||
'twitter' => '',
|
||||
'instagram' => '',
|
||||
'linkedin' => '',
|
||||
'facebook' => 'https://facebook.com/',
|
||||
'twitter' => 'https://twitter.com/',
|
||||
'instagram' => 'https://instagram.com/',
|
||||
'linkedin' => 'https://linkedin.com/',
|
||||
'youtube' => '',
|
||||
'tiktok' => '',
|
||||
'github' => '',
|
||||
@@ -541,6 +541,60 @@ class SettingSeeder extends Seeder
|
||||
'is_public' => true,
|
||||
'is_active' => true,
|
||||
],
|
||||
|
||||
// ==========================================
|
||||
// FRONTEND LAYOUT AYARLARI (layout)
|
||||
// ==========================================
|
||||
[
|
||||
'key' => 'default_meta_title',
|
||||
'value' => 'Truncgil Citrus - Modern Web Çözümleri',
|
||||
'type' => 'string',
|
||||
'group' => 'layout',
|
||||
'label' => 'Varsayılan Meta Başlık',
|
||||
'description' => 'Sayfalarda özel meta başlık yoksa kullanılacak',
|
||||
'is_public' => true,
|
||||
'is_active' => true,
|
||||
],
|
||||
[
|
||||
'key' => 'default_meta_description',
|
||||
'value' => 'Yenilikçi teknoloji çözümleri ile geleceği şekillendiriyoruz',
|
||||
'type' => 'text',
|
||||
'group' => 'layout',
|
||||
'label' => 'Varsayılan Meta Açıklama',
|
||||
'description' => 'Sayfalarda özel meta açıklama yoksa kullanılacak',
|
||||
'is_public' => true,
|
||||
'is_active' => true,
|
||||
],
|
||||
[
|
||||
'key' => 'default_meta_image',
|
||||
'value' => 'assets/img/demos/f1.png',
|
||||
'type' => 'string',
|
||||
'group' => 'layout',
|
||||
'label' => 'Varsayılan Meta Görsel',
|
||||
'description' => 'Open Graph için varsayılan görsel',
|
||||
'is_public' => true,
|
||||
'is_active' => true,
|
||||
],
|
||||
[
|
||||
'key' => 'logo_path',
|
||||
'value' => 'assets/img/truncgil-yatay.svg',
|
||||
'type' => 'string',
|
||||
'group' => 'layout',
|
||||
'label' => 'Logo Yolu',
|
||||
'description' => 'Header\'da görünecek logo',
|
||||
'is_public' => true,
|
||||
'is_active' => true,
|
||||
],
|
||||
[
|
||||
'key' => 'favicon_path',
|
||||
'value' => 'assets/img/favicon.ico',
|
||||
'type' => 'string',
|
||||
'group' => 'layout',
|
||||
'label' => 'Favicon Yolu',
|
||||
'description' => 'Tarayıcı favicon',
|
||||
'is_public' => true,
|
||||
'is_active' => true,
|
||||
],
|
||||
|
||||
// ==========================================
|
||||
// SEO AYARLARI (seo)
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
# Veritabanı Seeder Kullanım Kılavuzu
|
||||
|
||||
## Genel Bakış
|
||||
|
||||
Sistemde 2 ana seeder bulunmaktadır:
|
||||
1. **PageSeeder** - Örnek sayfalar (home, about, services, contact, pricing)
|
||||
2. **SettingSeeder** - Site ayarları ve yapılandırmaları
|
||||
|
||||
## Seeder'ları Çalıştırma
|
||||
|
||||
### Tüm Seeder'ları Çalıştırma
|
||||
|
||||
```bash
|
||||
php artisan db:seed
|
||||
```
|
||||
|
||||
### Sadece Page Seeder'ı Çalıştırma
|
||||
|
||||
```bash
|
||||
php artisan db:seed --class=PageSeeder
|
||||
```
|
||||
|
||||
### Sadece Setting Seeder'ı Çalıştırma
|
||||
|
||||
```bash
|
||||
php artisan db:seed --class=SettingSeeder
|
||||
```
|
||||
|
||||
### Fresh Migration + Seed (Dikkat: Tüm veriler silinir!)
|
||||
|
||||
```bash
|
||||
php artisan migrate:fresh --seed
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## PageSeeder İçeriği
|
||||
|
||||
### Oluşturulan Sayfalar
|
||||
|
||||
1. **Anasayfa** (`slug: home`)
|
||||
- `is_homepage: true`
|
||||
- `template: home`
|
||||
- Bloklar: Hero, Features, Stats, CTA
|
||||
- Durum: published
|
||||
|
||||
2. **Hakkımızda** (`slug: about`)
|
||||
- `template: generic`
|
||||
- Bloklar: Hero, Features
|
||||
- Durum: published
|
||||
|
||||
3. **Hizmetlerimiz** (`slug: services`)
|
||||
- `template: generic`
|
||||
- Bloklar: Hero, Features (6 hizmet)
|
||||
- Durum: published
|
||||
|
||||
4. **İletişim** (`slug: contact`)
|
||||
- `template: generic`
|
||||
- Bloklar: Hero, Contact Form
|
||||
- Durum: published
|
||||
|
||||
5. **Fiyatlandırma** (`slug: pricing`)
|
||||
- `template: generic`
|
||||
- Bloklar: Hero, Pricing (3 paket)
|
||||
- Durum: published
|
||||
- `show_in_menu: false` (menüde görünmez)
|
||||
|
||||
### Blok Yapısı Örneği
|
||||
|
||||
```json
|
||||
{
|
||||
"sections": [
|
||||
{
|
||||
"type": "hero",
|
||||
"data": {
|
||||
"badge": "YENİ PLATFORM",
|
||||
"title": "Modern ve Çok Amaçlı Web Çözümleri",
|
||||
"subtitle": "...",
|
||||
"primary_button_text": "Hemen Başla",
|
||||
"primary_button_url": "#features"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "features",
|
||||
"data": {
|
||||
"section_title": "Neden Truncgil Citrus?",
|
||||
"features": [...]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## SettingSeeder İçeriği
|
||||
|
||||
### Gruplar ve Ayarlar
|
||||
|
||||
| Grup | Açıklama | Örnek Ayarlar |
|
||||
|------|----------|---------------|
|
||||
| `general` | Genel site ayarları | site_name, site_description, logo, favicon |
|
||||
| `theme` | Tema ve renk ayarları | primary_color, secondary_color, custom_css |
|
||||
| `localization` | Dil ve bölge ayarları | timezone, currency, date_format |
|
||||
| `email` | E-posta sunucu ayarları | mail_host, mail_port, mail_from |
|
||||
| `social` | Sosyal medya linkleri | facebook, instagram, linkedin, twitter |
|
||||
| `layout` | Frontend layout ayarları | default_meta_title, logo_path, favicon_path |
|
||||
| `seo` | SEO ve analitik ayarları | google_analytics, meta_keywords |
|
||||
| `security` | Güvenlik ayarları | max_login_attempts, password_rules |
|
||||
| `upload` | Dosya yükleme ayarları | max_size, allowed_types, image_quality |
|
||||
| `notification` | Bildirim ayarları | email_enabled, sms_enabled |
|
||||
| `cache` | Cache ayarları | cache_driver, cache_duration |
|
||||
| `payment` | Ödeme ayarları | default_gateway, test_mode |
|
||||
| `api` | API ayarları | rate_limit, auth_method |
|
||||
| `logging` | Log ayarları | log_level, retention_days |
|
||||
| `performance` | Performans ayarları | query_cache, cdn_enabled |
|
||||
| `integration` | 3. parti entegrasyonlar | recaptcha, stripe, paypal |
|
||||
|
||||
### Frontend için Kritik Ayarlar
|
||||
|
||||
```php
|
||||
// Layout için
|
||||
'default_meta_title' => 'Truncgil Citrus - Modern Web Çözümleri'
|
||||
'default_meta_description' => 'Yenilikçi teknoloji çözümleri...'
|
||||
'default_meta_image' => 'assets/img/demos/f1.png'
|
||||
'logo_path' => 'assets/img/truncgil-yatay.svg'
|
||||
'favicon_path' => 'assets/img/favicon.ico'
|
||||
|
||||
// Sosyal medya
|
||||
'social_links' => {
|
||||
'facebook': 'https://facebook.com/',
|
||||
'instagram': 'https://instagram.com/',
|
||||
'linkedin': 'https://linkedin.com/',
|
||||
'twitter': 'https://twitter.com/'
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Seeder Sonrası Kontrol
|
||||
|
||||
### 1. Veritabanı Kontrolü
|
||||
|
||||
```bash
|
||||
# Pages tablosunu kontrol et
|
||||
php artisan tinker
|
||||
>>> App\Models\Page::count()
|
||||
=> 5
|
||||
|
||||
>>> App\Models\Page::where('status', 'published')->count()
|
||||
=> 5
|
||||
|
||||
>>> App\Models\Page::where('is_homepage', true)->first()->slug
|
||||
=> "home"
|
||||
```
|
||||
|
||||
### 2. Setting Kontrolü
|
||||
|
||||
```bash
|
||||
php artisan tinker
|
||||
>>> App\Models\Setting::where('key', 'default_meta_title')->first()->value
|
||||
=> "Truncgil Citrus - Modern Web Çözümleri"
|
||||
|
||||
>>> App\Models\Setting::where('key', 'social_links')->first()->value
|
||||
=> "{\"facebook\":\"https://facebook.com/\",...}"
|
||||
```
|
||||
|
||||
### 3. Frontend Kontrolü
|
||||
|
||||
- `https://citrus.truncgil.com/` → Anasayfa (home template + bloklar)
|
||||
- `https://citrus.truncgil.com/about` → Hakkımızda
|
||||
- `https://citrus.truncgil.com/services` → Hizmetler
|
||||
- `https://citrus.truncgil.com/contact` → İletişim
|
||||
- `https://citrus.truncgil.com/pricing` → Fiyatlandırma
|
||||
|
||||
---
|
||||
|
||||
## Özelleştirme
|
||||
|
||||
### Yeni Sayfa Ekleme
|
||||
|
||||
`database/seeders/PageSeeder.php` içinde `$pages` dizisine ekleyin:
|
||||
|
||||
```php
|
||||
[
|
||||
'title' => 'Portfolyo',
|
||||
'slug' => 'portfolio',
|
||||
'template' => 'generic',
|
||||
'status' => 'published',
|
||||
'show_in_menu' => true,
|
||||
'sort_order' => 6,
|
||||
'published_at' => now(),
|
||||
'sections' => [
|
||||
// Bloklar...
|
||||
],
|
||||
]
|
||||
```
|
||||
|
||||
### Var Olan Sayfayı Güncelleme
|
||||
|
||||
Seeder updateOrCreate kullanıyor, slug'a göre günceller:
|
||||
|
||||
```bash
|
||||
php artisan db:seed --class=PageSeeder
|
||||
```
|
||||
|
||||
Aynı slug varsa güncellenir, yoksa yeni kayıt oluşturulur.
|
||||
|
||||
### Setting Değerlerini Değiştirme
|
||||
|
||||
`database/seeders/SettingSeeder.php` içinde ilgili `value` alanını değiştirin ve çalıştırın:
|
||||
|
||||
```bash
|
||||
php artisan db:seed --class=SettingSeeder
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Sorun Giderme
|
||||
|
||||
### "Class not found" Hatası
|
||||
|
||||
```bash
|
||||
composer dump-autoload
|
||||
php artisan clear-compiled
|
||||
php artisan config:clear
|
||||
php artisan db:seed
|
||||
```
|
||||
|
||||
### "Table doesn't exist" Hatası
|
||||
|
||||
```bash
|
||||
php artisan migrate
|
||||
php artisan db:seed
|
||||
```
|
||||
|
||||
### Seeder Çalışmıyor
|
||||
|
||||
```bash
|
||||
# Verbose mode ile hata detaylarını görün
|
||||
php artisan db:seed --class=PageSeeder -vvv
|
||||
```
|
||||
|
||||
### Fresh Start (Tüm veriyi sıfırlama)
|
||||
|
||||
```bash
|
||||
php artisan migrate:fresh --seed
|
||||
```
|
||||
|
||||
⚠️ **Uyarı:** Bu komut tüm tabloları siler ve yeniden oluşturur!
|
||||
|
||||
---
|
||||
|
||||
**Son Güncelleme:** {{ now()->format('d.m.Y H:i') }}
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', $page ? ($page->meta_title ?? $page->title) : 'Trunçgil Teknoloji')
|
||||
@section('description', $page ? ($page->meta_description ?? $page->excerpt) : 'Trunçgil Teknoloji - Yenilikçi Çözümler')
|
||||
|
||||
@section('content')
|
||||
|
||||
<!-- Hero Section -->
|
||||
<section class="relative overflow-hidden bg-gradient-to-br from-white via-red-50/30 to-orange-50/20 dark:from-gray-900 dark:via-gray-900 dark:to-gray-800 py-20 lg:py-32">
|
||||
<div class="absolute inset-0 overflow-hidden">
|
||||
<!-- Decorative Elements -->
|
||||
<div class="absolute -top-40 -right-40 w-80 h-80 bg-red-500/10 dark:bg-red-500/5 rounded-full blur-3xl"></div>
|
||||
<div class="absolute -bottom-40 -left-40 w-80 h-80 bg-orange-500/10 dark:bg-orange-500/5 rounded-full blur-3xl"></div>
|
||||
</div>
|
||||
|
||||
<div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
|
||||
<!-- Content -->
|
||||
<div class="text-center lg:text-left" data-aos="fade-right">
|
||||
@if($page)
|
||||
<h1 class="text-4xl md:text-5xl lg:text-6xl font-bold text-gray-900 dark:text-white mb-6 leading-tight">
|
||||
{{ $page->title }}
|
||||
</h1>
|
||||
@if($page->excerpt)
|
||||
<p class="text-lg md:text-xl text-gray-600 dark:text-gray-300 mb-8 leading-relaxed">
|
||||
{{ $page->excerpt }}
|
||||
</p>
|
||||
@endif
|
||||
@else
|
||||
<h1 class="text-4xl md:text-5xl lg:text-6xl font-bold text-gray-900 dark:text-white mb-6 leading-tight">
|
||||
Hoş Geldiniz
|
||||
<span class="block text-transparent bg-clip-text bg-gradient-to-r from-red-600 to-orange-500">
|
||||
Trunçgil Teknoloji
|
||||
</span>
|
||||
</h1>
|
||||
<p class="text-lg md:text-xl text-gray-600 dark:text-gray-300 mb-8 leading-relaxed">
|
||||
Yenilikçi teknoloji çözümleri ile geleceği şekillendiriyoruz
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-col sm:flex-row gap-4 justify-center lg:justify-start">
|
||||
<a href="#hakkimizda" class="inline-flex items-center justify-center px-8 py-3 bg-red-600 hover:bg-red-700 text-white font-semibold rounded-lg shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-0.5">
|
||||
Keşfet
|
||||
<svg class="w-5 h-5 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"></path>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="#iletisim" class="inline-flex items-center justify-center px-8 py-3 bg-white dark:bg-gray-800 text-gray-900 dark:text-white font-semibold rounded-lg shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-0.5 border-2 border-gray-200 dark:border-gray-700">
|
||||
İletişime Geç
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Image/Logo -->
|
||||
<div class="flex justify-center lg:justify-end" data-aos="fade-left">
|
||||
<div class="relative">
|
||||
<div class="absolute inset-0 bg-gradient-to-tr from-red-500/20 to-orange-500/20 rounded-2xl blur-2xl"></div>
|
||||
<img src="{{ asset('logos/truncgil-dikey.svg') }}" alt="Trunçgil Teknoloji" class="relative h-64 md:h-80 lg:h-96 w-auto drop-shadow-2xl dark:hidden">
|
||||
<img src="{{ asset('logos/truncgil-dikey-dark.svg') }}" alt="Trunçgil Teknoloji" class="relative h-64 md:h-80 lg:h-96 w-auto drop-shadow-2xl hidden dark:block">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@if($page && $page->content)
|
||||
<!-- Page Content -->
|
||||
<section class="py-16 lg:py-24 bg-white dark:bg-gray-900">
|
||||
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="prose prose-lg dark:prose-invert max-w-none prose-headings:text-gray-900 dark:prose-headings:text-white prose-p:text-gray-600 dark:prose-p:text-gray-300 prose-a:text-red-600 dark:prose-a:text-red-400">
|
||||
{!! $page->content !!}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
<!-- Features Section -->
|
||||
<section id="hakkimizda" class="py-16 lg:py-24 bg-gray-50 dark:bg-gray-800">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="text-center mb-16" data-aos="fade-up">
|
||||
<h2 class="text-3xl md:text-4xl font-bold text-gray-900 dark:text-white mb-4">
|
||||
Neden Trunçgil Teknoloji?
|
||||
</h2>
|
||||
<p class="text-lg text-gray-600 dark:text-gray-300 max-w-2xl mx-auto">
|
||||
Modern teknolojiler ve uzman ekibimizle projelerinizi hayata geçiriyoruz
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
<!-- Feature 1 -->
|
||||
<div class="bg-white dark:bg-gray-900 rounded-xl p-8 shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1" data-aos="fade-up" data-aos-delay="100">
|
||||
<div class="w-14 h-14 bg-red-100 dark:bg-red-900/30 rounded-lg flex items-center justify-center mb-6">
|
||||
<svg class="w-7 h-7 text-red-600 dark:text-red-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-gray-900 dark:text-white mb-3">
|
||||
Hızlı Çözümler
|
||||
</h3>
|
||||
<p class="text-gray-600 dark:text-gray-300">
|
||||
Modern teknolojiler kullanarak projelerinizi hızlı ve verimli bir şekilde hayata geçiriyoruz.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Feature 2 -->
|
||||
<div class="bg-white dark:bg-gray-900 rounded-xl p-8 shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1" data-aos="fade-up" data-aos-delay="200">
|
||||
<div class="w-14 h-14 bg-orange-100 dark:bg-orange-900/30 rounded-lg flex items-center justify-center mb-6">
|
||||
<svg class="w-7 h-7 text-orange-600 dark:text-orange-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-gray-900 dark:text-white mb-3">
|
||||
Güvenli Altyapı
|
||||
</h3>
|
||||
<p class="text-gray-600 dark:text-gray-300">
|
||||
En son güvenlik standartlarını kullanarak verilerinizi koruma altına alıyoruz.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Feature 3 -->
|
||||
<div class="bg-white dark:bg-gray-900 rounded-xl p-8 shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1" data-aos="fade-up" data-aos-delay="300">
|
||||
<div class="w-14 h-14 bg-blue-100 dark:bg-blue-900/30 rounded-lg flex items-center justify-center mb-6">
|
||||
<svg class="w-7 h-7 text-blue-600 dark:text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-gray-900 dark:text-white mb-3">
|
||||
Uzman Ekip
|
||||
</h3>
|
||||
<p class="text-gray-600 dark:text-gray-300">
|
||||
Deneyimli ve uzman ekibimiz ile her zaman yanınızdayız.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- CTA Section -->
|
||||
<section id="iletisim" class="py-16 lg:py-24 bg-gradient-to-br from-red-600 to-orange-600 dark:from-red-700 dark:to-orange-700">
|
||||
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center" data-aos="zoom-in">
|
||||
<h2 class="text-3xl md:text-4xl font-bold text-white mb-6">
|
||||
Projenizi Konuşalım
|
||||
</h2>
|
||||
<p class="text-lg text-white/90 mb-8 max-w-2xl mx-auto">
|
||||
Size özel çözümler geliştirmek için iletişime geçin
|
||||
</p>
|
||||
<a href="mailto:info@truncgil.com" class="inline-flex items-center justify-center px-8 py-3 bg-white text-red-600 font-semibold rounded-lg shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-0.5">
|
||||
İletişime Geç
|
||||
<svg class="w-5 h-5 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@@ -1,103 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', $page->meta_title ?? $page->title)
|
||||
@section('description', $page->meta_description ?? $page->excerpt ?? '')
|
||||
|
||||
@section('content')
|
||||
|
||||
<!-- Page Header -->
|
||||
<section class="relative overflow-hidden bg-gradient-to-br from-white via-red-50/30 to-orange-50/20 dark:from-gray-900 dark:via-gray-900 dark:to-gray-800 py-16 lg:py-24">
|
||||
<div class="absolute inset-0 overflow-hidden">
|
||||
<div class="absolute -top-40 -right-40 w-80 h-80 bg-red-500/10 dark:bg-red-500/5 rounded-full blur-3xl"></div>
|
||||
<div class="absolute -bottom-40 -left-40 w-80 h-80 bg-orange-500/10 dark:bg-orange-500/5 rounded-full blur-3xl"></div>
|
||||
</div>
|
||||
|
||||
<div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="max-w-4xl mx-auto text-center">
|
||||
<h1 class="text-4xl md:text-5xl lg:text-6xl font-bold text-gray-900 dark:text-white mb-6 leading-tight">
|
||||
{{ $page->title }}
|
||||
</h1>
|
||||
|
||||
@if($page->excerpt)
|
||||
<p class="text-lg md:text-xl text-gray-600 dark:text-gray-300 leading-relaxed">
|
||||
{{ $page->excerpt }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if($page->published_at)
|
||||
<div class="mt-6 flex items-center justify-center text-sm text-gray-500 dark:text-gray-400">
|
||||
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
|
||||
</svg>
|
||||
{{ $page->published_at->format('d M Y') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Page Content -->
|
||||
<section class="py-16 lg:py-24 bg-white dark:bg-gray-900">
|
||||
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
@if($page->featured_image)
|
||||
<div class="mb-12 rounded-xl overflow-hidden shadow-xl">
|
||||
<img src="{{ $page->featured_image_url }}" alt="{{ $page->title }}" class="w-full h-auto">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="prose prose-lg dark:prose-invert max-w-none
|
||||
prose-headings:text-gray-900 dark:prose-headings:text-white
|
||||
prose-p:text-gray-600 dark:prose-p:text-gray-300
|
||||
prose-a:text-red-600 dark:prose-a:text-red-400 hover:prose-a:text-red-700 dark:hover:prose-a:text-red-300
|
||||
prose-strong:text-gray-900 dark:prose-strong:text-white
|
||||
prose-code:text-red-600 dark:prose-code:text-red-400
|
||||
prose-pre:bg-gray-100 dark:prose-pre:bg-gray-800
|
||||
prose-blockquote:border-red-500 dark:prose-blockquote:border-red-400
|
||||
prose-img:rounded-xl prose-img:shadow-lg">
|
||||
{!! $page->content !!}
|
||||
</div>
|
||||
|
||||
<!-- Child Pages -->
|
||||
@if($page->children->where('status', 'published')->count() > 0)
|
||||
<div class="mt-16 pt-16 border-t border-gray-200 dark:border-gray-700">
|
||||
<h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-8">
|
||||
İlgili Sayfalar
|
||||
</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
@foreach($page->children->where('status', 'published')->sortBy('sort_order') as $child)
|
||||
<a href="{{ $child->url }}" class="group block p-6 bg-gray-50 dark:bg-gray-800 rounded-lg hover:shadow-lg transition-all duration-300 transform hover:-translate-y-1">
|
||||
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-2 group-hover:text-red-600 dark:group-hover:text-red-400 transition-colors">
|
||||
{{ $child->title }}
|
||||
</h3>
|
||||
@if($child->excerpt)
|
||||
<p class="text-gray-600 dark:text-gray-300 text-sm line-clamp-2">
|
||||
{{ $child->excerpt }}
|
||||
</p>
|
||||
@endif
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Navigation Buttons -->
|
||||
<div class="mt-12 pt-8 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center">
|
||||
<a href="{{ route('home') }}" class="inline-flex items-center text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 transition-colors">
|
||||
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path>
|
||||
</svg>
|
||||
Ana Sayfaya Dön
|
||||
</a>
|
||||
|
||||
@if($page->parent)
|
||||
<a href="{{ $page->parent->url }}" class="inline-flex items-center text-gray-600 dark:text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors">
|
||||
Üst Sayfa
|
||||
<svg class="w-5 h-5 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 10l7-7m0 0l7 7m-7-7v18"></path>
|
||||
</svg>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user