ericlagarda / temporal
Laravel 5 package to create temporal url resources
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ericlagarda/temporal
Requires
- php: >=5.4.0
- illuminate/config: ~5.0
- illuminate/support: ~5.0
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2025-10-13 00:53:11 UTC
README
This package generates temporary tokens to use with your models, urls, controllers or whatever you want.
Installation
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.
How to use
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.
License
The MIT License (MIT).