New

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

ericlagarda/temporal

Laravel 5 package to create temporal url resources
23 1
Install
composer require ericlagarda/temporal
Latest Version:1.0
PHP:>=5.4.0
Laravel:5
License:MIT
Last Updated:May 3, 2016
Links: GitHub  ·  Packagist
Maintainer: Krato1

Temporal Tokens for Laravel

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).

Related Packages

gazugafan/laravel-temporal

Temporal models and versioning for Laravel 5

11,047 33
roadrunner-php/laravel-bridge

Laravel integration for RoadRunner with support for HTTP, Jobs, gRPC, and Tempor...

95,444 509
doctrine/dbal

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

651,963,193 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

518,004,183 7,444

Version History

Version Released PHP Laravel License
1.0 >=5.4.0 ~5.0 MIT