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:
Ümit Tunç
2025-10-30 15:55:32 -03:00
parent 05eb3bf34a
commit 4a98a6d8f0
8 changed files with 664 additions and 263 deletions
+4
View File
@@ -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()