Fix persistance et format des projets masqués
All checks were successful
Deploy Preprod / Build and Deploy to Preprod (push) Successful in 29s
All checks were successful
Deploy Preprod / Build and Deploy to Preprod (push) Successful in 29s
- Route toggle-hidden-project : utilisation collection Pages avec add/remove puis toArray() + encode YAML (pattern de toggle-favorite) - Controller site.php : ->values() au lieu de ->data pour retourner un vrai tableau au lieu d'un objet Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
30b7697c64
commit
89c1cb24c0
2 changed files with 21 additions and 22 deletions
|
|
@ -41,7 +41,7 @@ return function ($page, $kirby, $site) {
|
|||
if ($kirby->user()->hiddenProjects()->exists() && $kirby->user()->hiddenProjects()->isNotEmpty()) {
|
||||
$userData['hiddenProjects'] = $kirby->user()->hiddenProjects()->toPages()->map(function ($project) {
|
||||
return (string) $project->uuid();
|
||||
})->data;
|
||||
})->values();
|
||||
} else {
|
||||
$userData['hiddenProjects'] = [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue