luciano-jr / laravel-aerospike by luciano-jr

Service to use Aerospike Cache in Laravel 5
2,585
0
3
Package Data
Maintainer Username: luciano-jr
Maintainer Contact: luciano@lucianojr.com.br (Luciano Jr)
Package Create Date: 2016-08-19
Package Last Update: 2016-09-08
Language: PHP
License: MIT
Last Refreshed: 2024-11-22 15:04:52
Package Statistics
Total Downloads: 2,585
Monthly Downloads: 10
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 4
Total Open Issues: 0

laravel-aerospike

A service to use Aerospike Cache on Laravel 5

Installation

1. Dependency

Using composer, execute the following command to automatically update your composer.json:

composer require luciano-jr/laravel-aerospike

or manually update your composer.json file

{
	"require": {
		"luciano-jr/laravel-aerospike": "dev-master"
	}
}

2. Provider

You need to update your application configuration in order to register the package, so it can be loaded by Laravel. Just update your config/app.php file adding the following code at the end of your 'providers' section:

// file START ommited
    'providers' => [
        // other providers ommited
        Lucianojr\Aerospike\Providers\AerospikeServiceProvider::class,
    ],
// file END ommited

2.1 Publishing configuration file

To publish the default configuration file, execute the following command:

php artisan vendor:publish

You can also publish only the configuration file:

php artisan vendor:publish --tag=config

If you already published aerospike files, but for some reason you want to override previous published files, add the --force flag.

3. Facade (optional)

In order to use the AerospikeCache facade, you need to register it on the config/app.php file, you can do that the following way:

// config.php file
// file START ommited
    'aliases' => [
        // other Facades ommited
        'AerospikeCache' => Lucianojr\Aerospike\Facades\AerospikeFacade::class,
    ],
// file END ommited