benjamincrozat/laravel-pgbal

This package is abandoned and no longer maintained. The author suggests using the laravel-pgbal package instead.

Laravel middleware to prevent going back after logging out.

1.0.0 2017-02-25 09:36 UTC

This package is not auto-updated.

Last update: 2018-09-05 09:35:59 UTC


README

Build Status Latest Stable Version License Total Downloads

Laravel Prevent Going Back After Logout Middleware

Laravel middleware to prevent going back after logging out.

Note

It doesn't seem to work on Webkit based browsers that seem to ignore the HTTP headers that the middleware sends. No problem on Chrome and Opera, though. I didn't test on Firefox, IE and Edge yet.

Installation

composer require benjamincrozat/laravel-pgbal

Usage

In your app/Http/Kernel.php, add the middleware:

protected $routeMiddleware = [
    // ...

    'prevent-going-back-after-logout' => \BC\Laravel\PGBAL\Middleware::class,
];

Now, for example, in your routes/web.php file:

Route::get('/dashboard', 'DashboardController@index')
    ->middleware('prevent-going-back-after-logout')

License

WTFPL