Hello, I’ve gotten the following piece of code from the internet and I don’t udnerstand why it’s not working:
use Cake\ORM\TableRegistry;
'Other code here
$rights = TableRegistry::get('Rights');
if($rights->exists(['name' => $reqRight]))
I’m getting the error ‘Unknown method “exists”’ and I can’t find anything about this error.