Search code examples
cakephpcakephp-3.0cakephp-bake

CakePHP3 - Reverse (delete) generated (baked) controller


I generated (baked) controller via terminal command:

bin/cake bake.bake controller [controller_name]

Is there a command to reverse it? To delete generated controller?


Solution

  • CakePHP does not have reverse generator.

    When deleting files with rm -rf or by hand, you should note that new files are not only generated inside Controller directory. You should also track other files in test and template directories.

    Possible workaround for this is to use a real framework like Ruby On Rails or write your own shell scripts for generating or deleting.