Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel route logout

<?php

namespace AppHttpControllers;

use IlluminateHttpRequest;
use IlluminateSupportFacadesAuth;
use IlluminateSupportFacadesSession;

class LogoutController extends Controller
{
    /**
     * Log out account user.
     *
     * @return IlluminateRoutingRedirector
     */
    public function perform()
    {
        Session::flush();
        
        Auth::logout();

        return redirect('login');
    }
}
Source by codeanddeploy.com #
 
PREVIOUS NEXT
Tagged: #laravel #route #logout
ADD COMMENT
Topic
Name
8+8 =