Add dynamic template system: Implemented header, footer, and section templates with corresponding models, migrations, and Filament resources. Enhanced Page model to support dynamic templates and updated localization files for new terms. Added TemplateService for managing template data and rendering. Comprehensive documentation included for usage and best practices.

This commit is contained in:
Ümit Tunç
2025-10-31 14:53:34 -03:00
parent 0f78292c46
commit c042cb5114
46 changed files with 2709 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\HasMany;
class FooterTemplate extends Model
{
use SoftDeletes;
protected $fillable = [
'title',
'html_content',
'is_active',
];
protected $casts = [
'is_active' => 'boolean',
];
/**
* Get the pages that use this footer template.
*/
public function pages(): HasMany
{
return $this->hasMany(Page::class, 'footer_template_id');
}
}