Our project has around 15+ exactly equal data table index pages which show the content of a database table and provide the Edit/Delete/Add functionality.
I can put lot of the equal code into a PHP file which is then included by each
index.php in the corresponding directory. Even this would minimize a lot of repeated code I am wondering if there is a possibility to make it more general.
My intention is that these
index.php files do NOT exist and when they are accessed with
www.example.com/data2 and so on, a hook delivers the content of the personalized HTML file on the fly. Which table is accessed is described in the URL - this is just a simple parse task.
Is there some of the described functionality? It would be some kind of a
catch-all functionality for certain pages.
Note: More or less it should work like PhpMyAdmin. The PMA engine displays standardized a table/database provided in the URL. BUT, of course, I am not writing another PMA, it’s just an example how I expect it to work.
I am working with CakePHP 4.1.0