1.1.0 • Published 6 years ago

laravel-logout v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

laravel-logout

Package for Laravel Logout

Installation

npm install laravel-logout

This package need X-CSRF-TOKEN, add this code to your header template

<meta name="csrf-token" content="{{ csrf_token() }}">

In your app.js, add this code

require('laravel-logout');

Usage

In your blade template

<a laravel-logout>Logout</a>

The default logout url use logout route from laravel ('/logout'). If you have different logout url, use data-action attribute

<a laravel-logout data-action="your-logout-url">Logout</a>