I am working on Cakephp 3. I am little bit confused. I have created theme as a plugin and i want to know whether to code it in theme folder or main project folder. I want to know the general rule how to work with theme when used as a plugin, its controllers and model will be in theme folder or i have to use main application controller folder.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Just a quick follow-up on this question in case anyone comes across this in the future.
You can put them in plugins/MyPlugin/src/ for example, and then to load the classes automatically, you can add the following to your composer.json file:
{
**"autoload"**: {
**"psr-4"**: {
**"MyPlugin\\"**: "plugins/MyPlugin/src/"
}
},
**"autoload-dev"**: {
**"psr-4"**: {
**"MyPlugin\\Test\\"**: "plugins/MyPlugin/tests/"
}
}
}
For more information here is a link to the official docs:
https://book.cakephp.org/3/en/plugins.html
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.