2017 © Pedro Peláez
 

library state

Laravel package for storing current application state in cache/session

image

fetzi/state

Laravel package for storing current application state in cache/session

  • Tuesday, December 13, 2016
  • by fetzi
  • Repository
  • 1 Watchers
  • 3 Stars
  • 97 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

    Packagist Downloads, (*1)

State package for Laravel

This laravel package allows to store a certain application state in either the session or inside a cache., (*2)

Installation

Run composer require karriere/state to install this package., (*3)

Usage

To enable the package you need to reference the StoreServiceProvider class inside your config/app.php file in the providers section:, (*4)

'providers' => [
    ...
    Karriere\State\StateServiceProvider::class,
    ...
];

To store the application state you create a state object and store it:, (*5)

$state = $stateFactory->build('state-name', ['key' => 'value']);
$store->put($state);

// pass on $state->identifier()

In a later situation where you have the state identifier you can access the states data by:, (*6)

$state = $store->get($identifier);

if(!$state->isEmpty()) {
  // use either $state->collection() or $state->raw() to access the state data
}

Configuration

To install the configuration file you simply use:, (*7)

php artisan vendor:publish

Options

  • storage: session|cache
  • storage-prefix: prefix that is added to the store identifier
  • expires-after: defines the expires after time in seconds, only used for CacheStore

License

Apache License 2.0 Please see LICENSE for more information., (*8)

The Versions

13/12 2016

dev-master

9999999-dev https://github.com/fetzi/state

Laravel package for storing current application state in cache/session

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel stack cache login session cacheable state

30/11 2016

v0.2.1

0.2.1.0 https://github.com/fetzi/state

Laravel package for storing current application state in cache/session

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel stack cache login session cacheable state

30/11 2016

dev-feature/state-tests

dev-feature/state-tests https://github.com/fetzi/state

Laravel package for storing current application state in cache/session

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel stack cache login session cacheable state

30/11 2016

v0.2.0

0.2.0.0 https://github.com/fetzi/state

Laravel package for storing current application state in cache/session

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel stack cache login session cacheable state

25/11 2016

v0.1.1

0.1.1.0 https://github.com/fetzi/state

Laravel package for storing current application state in cache/session

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel stack cache login session cacheable state

25/11 2016

v0.1.0

0.1.0.0 https://github.com/fetzi/state

Laravel package for storing current application state in cache/session

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel stack cache login session cacheable state