PHPackages                             influendo/laravel-survivor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. influendo/laravel-survivor

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

influendo/laravel-survivor
==========================

Doesn't let your tokens expire

1.1.0(6y ago)1551.3k7[1 issues](https://github.com/Influendo/laravel-survivor/issues)MITPHPPHP &gt;=5.5.0CI failing

Since Mar 2Pushed 6y ago4 watchersCompare

[ Source](https://github.com/Influendo/laravel-survivor)[ Packagist](https://packagist.org/packages/influendo/laravel-survivor)[ RSS](/packages/influendo-laravel-survivor/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (6)Used By (0)

Laravel Survivor
================

[](#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)
--------------------------------------

[](#installation-laravel-52-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
--------------------

[](#laravel-54-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
-------------

[](#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
------------

[](#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.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~491 days

Total

4

Last Release

2254d ago

Major Versions

0.1.0 → 1.0.02016-03-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd692eb7c3ea730aae6d7dbce5e8cb641011c0e23002fd991667df87d63019b6?d=identicon)[lpeharda](/maintainers/lpeharda)

![](https://www.gravatar.com/avatar/17f1631e6f3df631090a3b8f53793a6a658f0fdcf2f5848f2186d6ddda5e0d2d?d=identicon)[bstrahija](/maintainers/bstrahija)

![](https://www.gravatar.com/avatar/baa69fb282a058d95e803e4640d064ebf37075850879fd3fa6f68c97c5fcd08d?d=identicon)[codeforest](/maintainers/codeforest)

---

Top Contributors

[![bstrahija](https://avatars.githubusercontent.com/u/125499?v=4)](https://github.com/bstrahija "bstrahija (7 commits)")[![codeforest](https://avatars.githubusercontent.com/u/1256030?v=4)](https://github.com/codeforest "codeforest (1 commits)")[![lukapeharda](https://avatars.githubusercontent.com/u/2076692?v=4)](https://github.com/lukapeharda "lukapeharda (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/influendo-laravel-survivor/health.svg)

```
[![Health](https://phpackages.com/badges/influendo-laravel-survivor/health.svg)](https://phpackages.com/packages/influendo-laravel-survivor)
```

###  Alternatives

[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
