Skip to content

Instantly share code, notes, and snippets.

@jayaregalinada
Last active January 24, 2018 14:29
Show Gist options
  • Save jayaregalinada/349b6088e46fc7ea08b0b5bf65ab5469 to your computer and use it in GitHub Desktop.
Save jayaregalinada/349b6088e46fc7ea08b0b5bf65ab5469 to your computer and use it in GitHub Desktop.
GET LOGOUT

On your App\Http\Controllers\Auth\LoginController you might have the following codes.

public function __construct()
{
    $this->middleware('guest')->except(['logout', 'getLogout']);
}

public function getLogout()
{
    return abort(404, 'No such thing');
}

Then, your web routes may looked like this.

Auth::routes();
Route::get('logout', 'Auth\LoginController@getLogout');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment