feat: Add Logos page, refactor Testimonials to RelationManager, and improve designs

This commit is contained in:
Muhammet Güler
2026-02-08 04:54:32 +03:00
parent 33c1ffe779
commit 177ebff119
24 changed files with 863 additions and 573 deletions
@@ -0,0 +1,35 @@
<?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::create('testimonials', function (Blueprint $table) {
$table->id();
$table->foreignId('page_id')->nullable()->constrained()->onDelete('cascade');
$table->string('name');
$table->string('position')->nullable();
$table->text('content');
$table->integer('rating')->default(5);
$table->string('avatar')->nullable();
$table->boolean('is_active')->default(true);
$table->integer('sort_order')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('testimonials');
}
};
@@ -0,0 +1,28 @@
<?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) {
$table->json('data')->nullable()->after('sections');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('pages', function (Blueprint $table) {
$table->dropColumn('data')->nullable();
});
}
};
+41
View File
@@ -0,0 +1,41 @@
<?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!');
}
}
+33 -1
View File
@@ -132,7 +132,7 @@ class PageSeeder extends Seeder
);
// 2.5 Müşteri Görüşleri (Child of Kurumsal)
Page::updateOrCreate(
$testimonialsPage = Page::updateOrCreate(
['slug' => 'musteri-gorusleri'],
[
'author_id' => $author->id,
@@ -149,6 +149,38 @@ class PageSeeder extends Seeder
]
);
// Varsayılan müşteri görüşlerini ekle
$defaultTestimonials = [
[
'name' => 'Kerem Can Azak',
'position' => 'Stellar Construction',
'content' => 'Dijital dönüşüm yolculuğumuzda yanımızda oldukları için mutluyuz. Profesyonel yaklaşımları ve çözüm odaklı çalışmaları ile projelerimize değer kattılar.',
'rating' => 5,
'sort_order' => 1,
],
[
'name' => 'Servet Demir',
'position' => 'Dijimind Akademi',
'content' => 'Eğitim teknolojileri alanındaki vizyoner bakış açıları ve teknik altyapı konusundaki uzmanlıkları sayesinde hedeflediğimiz kitleye çok daha etkili bir şekilde ulaştık.',
'rating' => 5,
'sort_order' => 2,
],
[
'name' => 'A. Cezmi Savaş',
'position' => 'Rhapsode Akademik Yayınevi',
'content' => 'Akademik yayıncılık süreçlerimizi dijitalleştirirken sundukları yenilikçi çözümler ve hızlı destekleri için teşekkür ederiz. Güvenilir bir iş ortağı.',
'rating' => 5,
'sort_order' => 3,
],
];
foreach ($defaultTestimonials as $testimonialData) {
\App\Models\Testimonial::updateOrCreate(
['page_id' => $testimonialsPage->id, 'name' => $testimonialData['name']],
$testimonialData
);
}
// 3. Ürünlerimiz (Mega Menu Target)
Page::updateOrCreate(
['slug' => 'urunlerimiz'],