Wednesday, March 2, 2022

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

Issue

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...


Solution

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



Answered By - rogyw

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.