This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
data-request="onWhateverHandler"
then have in your model/controller/component/whatever a function
public function onWhateverHandler() {
Flash::error("DO NOT CLICK THIS BUTTON!");
return "you clicked it";
}
read https://octobercms.com/docs/cms/ajax and https://octobercms.com/docs/backend/controllers-ajax
Thanks Tschallacka, actually im refering to Console Command Line that i develop for my plugin. here : http://octobercms.com/docs/console/development
i would need to run them manually on demand from the backend and not from the console which my client does not have access to and have no clue how to use it and does not want to learn how of course :)
ok i got it, in the AJAX Handler controller, you can use the Laravel Artisan Facade to call a console command.
public function onImport() { try { traceLog('init task...'); Artisan::call('acme:import'); traceLog('done ...'); } catch (Exception $e) { Response::make($e->getMessage(), 500); } }
Last updated
1-4 of 4