app/Http/Controllers/Auth/LoginController.php
public function logoutAction(Tree $tree = null): ResponseInterface
    {
        if (Auth::check()) {
            Log::addAuthenticationLog('Logout: ' . Auth::user()->userName() . '/' . Auth::user()->realName());
            Auth::logout();
            FlashMessages::addMessage(I18N::translate('You have signed out.'), 'info');
        }

        if ($tree === null) {
            return redirect(route('tree-page'));
        }

        return redirect(route('tree-page', ['ged' => $tree->name()]));
    }
public function logoutAction(Tree $tree = null): ResponseInterface
    {
        if (Auth::check()) {
            Log::addAuthenticationLog('Logout: ' . Auth::user()->userName() . '/' . Auth::user()->realName());
            Auth::logout();
            FlashMessages::addMessage(I18N::translate('You have signed out.'), 'info');
        }

        if ($tree === null) {
            return redirect(route('tree-page'));
        }

        return redirect(route('tree-page', ['ged' => $tree->name()]));
    }
public function logoutAction ( Tree $ tree = null ) : ResponseInterface { if ( Auth :: check ( ) ) { Log :: addAuthenticationLog ( 'Logout: ' . Auth :: user ( ) -> userName ( ) . '/' . Auth :: user ( ) -> realName ( ) ) ; Auth :: logout ( ) ; FlashMessages :: addMessage ( I18N :: translate ( 'You have signed out.' ) , 'info' ) ; } if ( $ tree === null ) { return redirect ( route ( 'tree-page' ) ) ; } return redirect ( route ( 'tree-page' , [ 'ged' => $ tree -> name ( ) ] ) ) ; }
Perform a logout.

@param Tree|null $tree

@return ResponseInterface
Perform a logout .