nikitin/key-storage

This package is abandoned and no longer maintained. No replacement package was suggested.

This package need for store Key => Value

v1.2 2018-03-14 09:34 UTC

This package is not auto-updated.

Last update: 2020-01-24 17:34:32 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Install

$ composer require nikitin/key-storage

Publish config file

$ php artisan vendor:publish --tag=key-storage

Add Service Provider

...
 \nikitin\KeyStorage\KeyStorageServiceProvider::class
...

And run

$ php artisan key-storage:create-table

Usage

Supported data types

  • integer
  • string
  • boolean
  • array
  • *serializable object
use nikitin\KeyStorage\Facades\KeyStorage;
...

KeyStorage::set('test', [1,2,3,4,5,'test'=>321]);

KeyStorage::get('test');
result: 
    array:6 [
          0 => 1
          1 => 2
          2 => 3
          3 => 4
          4 => 5
          "test" => 321
        ]
        
// If you need key type
  KeyStorage::getType('test');
  result: "array"

$inst = KeyStorage::getSelf();
$inst->set('key', 'value');
$result = $inst->get('key');

License

The MIT License (MIT). Please see License File for more information.