influendo/laravel-survivor
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 advisedNot 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 |
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)
-
Install via composer
composer require influendo/laravel-survivor
-
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
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.1.0 | >=5.5.0 | ~5.1| | 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 |