Policy related cakePHP bake command does't work(in my case)

626 views Asked by At

I am working on cakePHP (version 4.0.5) and when I tried to run

bin/cake bake policy --type entity Name

command, It'll gives an error .

Error: Unknown option type.

Can anyone encounter such problem and have any solution,kindly share...

1

There are 1 answers

0
rogyw On BEST ANSWER

I just ran into this message when I missed loading the Authorization plugin. Check you have loaded the plugin by adding the following statement to the bootstrap() method in src/Application.php:

$this->addPlugin('Authorization');

reference: https://book.cakephp.org/4/en/tutorials-and-examples/cms/authorization.html