I can change the active theme from the management dashboard in OctoberCMS by going to Settings/Front-end theme. Now I want to give the end-users the ability to change the theme by clicking on an icon. How can I change the theme programatically on the server side? I could not find the relevant code in the documents.
CLI command of enabling some theme is:
php artisan theme:use rainlab-vanilla
It means that you can call php code something like that:
Artisan::call('theme:use', ['rainlab-vanilla'])