I want to check if the ID passed by the user using a HTTP request exists in another table in cakephp. Right now, I tried using :
public function buildRules(RulesChecker $rules)
But It doesn't seems to work. This rule is in a reservation table, in this table I have a column called id_venue, I have another table called Venues which has a primary key called id_venue too.
public function initialize(array $config)
I've associated my Reservations table with my Venues table
Thanks for helping.