Similar to the other thread about Middleware, you could use the same approach. You could create a Middleware that sets the header and footer, then apply that Middleware to routes that need it, and don’t apply it to any routes that don’t need it.
tflight
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
|
Header/footer in php-view with Slim v3
|
3 | 4204 | April 6, 2016 | |
|
Auth Middleware in Slim 4
|
9 | 18330 | May 21, 2020 | |
|
Slim4-Response & Middleware Problem
|
6 | 3044 | May 27, 2022 | |
|
withJson and Content-Type
|
11 | 7335 | May 19, 2016 | |
|
Smil4 JSON data
|
6 | 2286 | March 26, 2020 |