Select table entry and use that for all subsequent queries in CAKEPHP 4 application

38 views Asked by At

I'm looking for the best approach for a workflow that I'm building for a Hockey Pool script written in CAKEPHP 4.x. To keep it simple, I have 3 tables (pools, players and teams). There can be multiple pools and each pool can have multiple teams. Those team then can have 1 or more players linked to them. I'm fine with all of the setup of the database and can create a functional site.

But what I want to do is have the user start with a pool. Then going forward when they add teams to that pool they are always adding players to that team (without having to select what team they are adding the team to).

My initial thought was to add the selected pool as query string so that as I move through the different components I would know what pool was initially selected. That works, but is not ideal as I have to ensure every link has that selected pool in the query string. My other thought was to store it as a cookie.

Thoughts?

0

There are 0 answers