A service to use Aerospike Cache on Laravel 5
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"
}
}
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
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.
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