ericlagarda/temporal is a Laravel package for laravel 5 package to create temporal url resources.
It currently has 1 GitHub stars and 23 downloads on Packagist (latest version 1.0).
Install it with composer require ericlagarda/temporal.
Discover more Laravel packages by ericlagarda
or browse all Laravel packages to compare alternatives.
Last updated
This package generates temporary tokens to use with your models, urls, controllers or whatever you want.
Use composer to install:
composer require ericlagarda/temporal
Add provider to your config/app.php
EricLagarda\Temporal\TemporalServiceProvider::class
Temporal facade is automatically registered as an alias for EricLagarda\Temporal\Facades\Temporal class.
You have two helpers to create and recieve temporal urls.
To create your token just call create method:
$myToken = Temporal::create($modelId, $expireTime); //$expireTime in minutes to expire
To decrypt this token and check if is valid, you can use check method:
$isValid = Temporal::check($token); //$token appended to url
Method check will return false in case token is invalid. Or object with id, expires, created_at if is valid.
The MIT License (MIT).