Add downloads and FAQs functionality to SolutionResource: implement repeaters for downloads and FAQs in the form, update Solution model to include new fields, and enhance the show view to display downloads and FAQs dynamically, improving content management and user experience.

This commit is contained in:
2025-07-29 14:54:13 +05:00
parent e97a80bfdb
commit 0a3fdf347f
5 changed files with 125 additions and 43 deletions

View File

@@ -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('solutions', function (Blueprint $table) {
$table->json('downloads')->nullable()->after('bullets');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('solutions', function (Blueprint $table) {
$table->dropColumn('downloads');
});
}
};

View File

@@ -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('solutions', function (Blueprint $table) {
$table->json('faqs')->nullable()->after('downloads');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('solutions', function (Blueprint $table) {
$table->dropColumn('faqs');
});
}
};