PHP code example of bach-pedersen / laravel-riak

1. Go to this page and download the library: Download bach-pedersen/laravel-riak library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bach-pedersen / laravel-riak example snippets


/*
    |--------------------------------------------------------------------------
    | Riak Database
    |--------------------------------------------------------------------------
    */
    'riak' => array(
        'host' => 'localhost',
        'port' => 8087
    )

/*
// File: app/config/app.php
'providers' => array(
        ...
        'BachPedersen\LaravelRiak\RiakServiceProvider',
),

/** @var $riak \Riak\Connection */
$riak = $this->app['riak'];

// or
/** @var $riak \Riak\Connection */
$riak = App::make('riak');


// File: app/config/app.php
'providers' => array(
        ...
        'BachPedersen\LaravelRiak\Cache\RiakCacheServiceProvider',
        ...
),

// File: app/config/cache.php
    ...
	'driver' => 'riak',
	'bucket' => 'laravel.cache',
    ...

// File: app/config/app.php
'providers' => array(
        ...
        'BachPedersen\LaravelRiak\Session\RiakSessionServiceProvider',
),

// File: app/config/session.php
    ...
	'driver' => 'riak',
	'bucket' => 'laravel.session',
    ...
  
php artisan cache:bucket:init  
php artisan session:bucket:init