Category: PHP

Table::get($name)->hasAny(['key' => 'value'] is not working in cakephp 3

Cake shows error unknown method "hasAny" when checking a record exists or not. Neither this..TableRegistry::get('Posts')->hasAny(['Post.id' => 1]);or that$this->Posts->hasAny(array(['Post.

SOLVED
1 Answers
Kristi
Kristi

137

Category: PHP

How to prevent Oauth2 app key and secret hard-coded in CakePHP?

Again Hi,I have a small application that uses Oauth2 to interact with third party service provider. I'd like to know if there is any way to protect key/secret in source code that other people cannot a

SOLVED #cakephp #security
1 Answers

Category: PHP

How to check latest SQL logs in the controller?

Hi,Is there a way to see latest SQL logs in CakePHP's controllers? I'd like to do this checking in my controller before rendering a view. Like: <?php echo $this->element('sql_dump'); ?

#cakephp #sql
1 Answers