Liste des sections
@php
$titre1 = \App\Models\Configuration::query()->where('label', 'titre_1')->value('value');
$titre2 = \App\Models\Configuration::query()->where('label', 'titre_2')->value('value');
$titre3 = \App\Models\Configuration::query()->where('label', 'titre_3')->value('value');
$color = \App\Models\Configuration::query()->where('label', 'color')->value('value');
$sectionCount1 = \App\Models\Home::where('section', "1")->count();
$sectionCount2 = \App\Models\Home::where('section', "2")->count();
$sectionCount3 = \App\Models\Home::where('section', "3")->count();
$configuration = \App\Models\Configuration::query()->where("label", "Configuration modules")->first();
$configValues = json_decode($configuration->value);
$para = $configValues->para ?? false;
$onlyPara = $configValues->onlypara ?? false;
// Debugging to ensure correct values are being assigned
$section1Display = false;
$section2Display = false;
$section3Display = false;
if ($para === false) {
$section1Display = false;
$section2Display = true;
$section3Display = false;
} else if ($para === true && $onlyPara === true) {
$section1Display = false;
$section2Display = false;
$section3Display = true;
} else {
$section1Display = true;
$section2Display = false;
$section3Display = false;
}
// Debugging section display values to verify conditions
@endphp
Liste des sections
@if($section1Display == true)
@endif
@if($section2Display == true)
@endif
@if($section3Display == true)
@endif