victormarconi
Member
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:
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...
I'd like to call some of Laravel's function from Xenforos controllers.
For example: Logging out:
PHP:
class Logout extends AbstractController
{
public function actionIndex()
{
$this->assertValidCsrfToken($this->filter('t', 'str'));
/** @var \XF\ControllerPlugin\Login $loginPlugin */
$loginPlugin = $this->plugin('XF:Login');
$loginPlugin->logoutVisitor();
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...