I am very new to phalcon and OOP programming in general. I am trying build a simple application using the vokuro example as a starting point. I only need to add a few tables. I need to limit output of a dataset to just the user that is logged in.
Table I: have added a "contract" table (that has many contracts from many users)
- id
- usersid
- description
I want to link it to the id in the users table already built into the vokuro example.
Table II: "workorder" table linked to "id" in"contract" table via contract id (1 contract will have many work orders)
- id
- contractid
- contractor name
How do I limit the response for a user so they can only "workorder" entries that belongs thier user and not other users in that "workorder" table. I have tried making the relationships in the model but have not had any luck limiting the outputbased on user. Any help is greatly appreciated!