Paket-Vorteile: dynamische, im Admin pflegbare Vorteilsliste je Tarif
Neue JSON-Spalte plans.benefits (Migration + Cast + Plan::benefitsList()). Im Admin (Tarife & Pakete) pro Tarif zeilenweise pflegbar; die In-App- Buchungsseite rendert die Liste in den Tarif-Karten statt einer festen Zeile. Seeder/Factory mit Beispiel-Vorteilen. Single Source of Truth fuer Buchungsseite und (folgt separat) die oeffentliche Preise-Seite. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
58b427fcd0
commit
446aada9c8
8 changed files with 161 additions and 8 deletions
|
|
@ -0,0 +1,31 @@
|
|||
<?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('plans', function (Blueprint $table): void {
|
||||
// Marketing-Vorteile je Tarif (eine Liste freier Texte), im Admin
|
||||
// pflegbar. Genutzt von der In-App-Buchungsseite und der
|
||||
// öffentlichen Preise-Seite (gemeinsame Datenquelle Plan).
|
||||
$table->json('benefits')->nullable()->after('daily_limit');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('plans', function (Blueprint $table): void {
|
||||
$table->dropColumn('benefits');
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue