Laravel-based framework for WordPress plugins
- php: ^7.2.5
- eftec/bladeone: ^3.21
- illuminate/database: ^7.0
- illuminate/events: ^7.0
- illuminate/filesystem: ^7.0
- illuminate/http: ^7.0
- illuminate/support: ^7.0
- illuminate/translation: ^7.0
- illuminate/validation: ^7.0
- laravel/helpers: ^1.0
- nesbot/carbon: ^2.0
- symfony/process: ^5.0
- symfony/var-dumper: ^5.0
- upstatement/routes: ^0.7
Acorn is a Laravel-based framework for WordPress plugins. Actually it is not a framework yet but just a collection of helper functions...
Inspiration originated from the promising Acorn project created by the Roots team which unfortunately is still in early development at the time of coding this framework (and which was missing some desperately needed features).
To get started make sure to define the following global variables (e.g. in the wp_config.php) which are needed for the booting the functionalities. The database is further assumed to have an utf8 charset and utf8_unicode_ci collation without prefixes.
- DB_ELOQUENT: The name of the database used
- DB_USER: MySQL database username
- DB_PASSWORD: MySQL database password
- DB_HOST: MySQL hostname
- WP_LANG: The locale used for e.g. validation features
Then install this composer package in your plugin directory at wp-content/plugins/plugin-name. Also copy the resouces and storage directories from this composer package to your plugin directory.
Finally initialize the framework in your main plugin file at wp-content/plugins/plugin-name/plugin-name.php by autoloading everything (via
require_once(__DIR__ . '/vendor/autoload.php');).