A
A
amorphine2016-09-05 12:36:05
Laravel
amorphine, 2016-09-05 12:36:05

Render twig template in October CMS console command?

There is a task to schedule a console command that generates html according to a given template.
There are no questions about creating a console script,
artisan make:console ...
however, what is the best way to place the template in the CMS directory structure and how to trigger its rendering? Is it better to create a controller for this and call it from a script? The command is registered in the plugin.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
helixly, 2016-11-11
@amorphine

If of course it is relevant, you can render the page like this

use Cms\Classes\Controller;

return Controller::render('main');

Where main is the filename of the page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question