• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Calling Laravel's autoloader or classes from Xenforo

I'm trying to integrate a Laravel app with Xenforo. (Topic 1, Topic 2).
I'd like to call some of Laravel's function from Xenforos controllers.

For example: Logging out:
class Logout extends AbstractController
    public function actionIndex()
        $this->assertValidCsrfToken($this->filter('t', 'str'));

        /** @var \XF\ControllerPlugin\Login $loginPlugin */
        $loginPlugin = $this->plugin('XF:Login');
        Auth::logout(); // LARAVEL CODE

        return $this->redirect($this->buildLink('index'));

How can I call Laravel' code from Xenforos controller?
Xenforo has some kind of callback functionality, which could allow me to call a function after the user logout? I'd like to keep Xenforo's files unchanged as much as I can...