New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

influendo/laravel-survivor

Doesn't let your tokens expire
51,619 15

Larablocks Analysis

influendo/laravel-survivor works with Laravel 5, 6 and 7 (latest release 1.1.0, Mar 17, 2020), all past end of life (the last on Sep 6, 2022): no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 5, 6 and 7, past end of life since Sep 6, 2022
  • No release in the last 12 months (last: Mar 17, 2020)
  • 22 downloads a month (needs 10,000)
  • 15 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Mar 17, 2020.
  • No releases in the last 12 months.
  • First released: Mar 2, 2016.
  • Monthly downloads: 22, up 83% from six months ago.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.

Install
composer require influendo/laravel-survivor
Latest Version:1.1.0
PHP:>=5.5.0
Laravel:5 · 6 · 7
License:MIT
Last Updated:Mar 17, 2020
Links: GitHub  ·  Packagist
Maintainer: bstrahija

Laravel Survivor

This library solves the problem if you have a site open and the you're gone from your device for some time. In this case the CSRF token used on your forms expires, and you get an Exception.

The purpose of this library is to keep the session from expiring, but also to keep the tokens up to date throughout your application.

Installation (Laravel 5.2 is required)

  1. Install via composer

    composer require influendo/laravel-survivor

  2. Add the script to your view. You can also add it to your footer.blade.php partial or your main layout file (by your own preference):

    {!! survivor() !!}

Laravel 5.4 or older

If you're running Laravel 5.4 or older, you need to manually register the service provider. So just add the service provider to your config\app.php file:

Influendo\LaravelSurvivor\SurvivorServiceProvider::class,

Configuration

To configure the library you just need to publish the default vendor configuration:

php artisan vendor:publish --tag=survivor

You can change the interval in miliseconds, the path for ping route and the query selector for input elements which will be updated when a token expires.

Funcionality

First of all the library pings a custom created endpoint in a predefined interval to keep your session up to date. When the CSRF token expires, the endpoint returns a new token, and the script then updates all the input fields named "_token" and a meta tag named "csrf-token".

If your using any 3rd party scripts, you can fetch the valid token at any time from the window.LaravelSurvivor.token object.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP Laravel License
1.1.0 >=5.5.0 ~5.1|^6.0|^7.0 MIT
1.0.1 >=5.5.0 ~5.1 MIT
1.0.0 >=5.5.0 ~5.1 MIT
0.1.0 >=5.5.0 ~5.1 MIT