Create folders in the main app webroot when installing my Cake Plugin via Composer


My cake plugin requires folders where it uploads file. So this would be WWW_ROOT.DS.‘plugin_name’.DS.‘users’ .

Is there a way to add in my plugin’s composer to run a script to create these folders? post-install-cmd ?

Isn’t that what the \App\Console\Installer::postInstall method is for? I’ve not tried it myself but seems logical to me.

1 Like

Thanks! I was looking for that. It doesn’t seem to be generated for my plugin via bake though.