Hey @Konafets, thank you for your interest. Acorn is still in development so I don’t think there will be a full fledged tutorial, sample plugin, or a ton of support until the API stabilizes. Until then, here are some pointers:
Acorn itself can either be included as a Composer dependency in a theme or plugin, or be installed as WordPress plugin on which other theme or plugins can depend. If you check out the Acorn plugin file itself, you can see how you’d load it in a dedicated plugin. Similarily, you can check out Sage 10’s
functions.php (also in-dev) for an example of how to load it in a theme.
Clover is our Acorn-powered plugin boilerplate. Currently, it’s in early development and is only accessible to Roots’ Patreon subscribers. If you want to try and cobble together a plugin with Acorn, you can check out the Clover related classes within Acorn.
The best way to start using Acorn is either with Sage 10 or with Clover since those are our two tangible examples Acorn being used. Again, the API is subject to change, but a goal is to make it as compatible with many packages originally intended for Laravel. One point of compatibility which is different is that — out of the box — Acorn doesn’t add any of the functions which Laravel does (e.g.
view(), etc.), to the global namespace. Acorn does include a filter to enable these global functions:
So far only key Laravel components (e.g. View/Blade, Filesystem, Database/Eloquent) have been implemented with Acorn. I could imagine others being included incrementally, but I’m not sure if some will translate well inside of a WordPress context.