1. Go to this page and download the library: Download orchestra/memory 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/ */
$memory->put('site.author', 'Taylor');
// or you can also use
Memory::put('site.author', 'Taylor');
$name = $memory->get('site.author');
// or you can also use
$name = Memory::get('site.author');
$name = $memory->get('site.author', 'Fred');
$memory->forget('site.author');
// or you can also use
Memory::forget('site.author');
use Orchestra\Contracts\Memory\Handler;
class AcmeMemoryHandler implements Handler
{
// Add your implementation
}
Memory::extend('acme', function ($app, $name) {
return new Orchestra\Memory\Provider(
new AcmeMemoryHandler($name)
);
});
// Now you can use it as
$acme = Memory::make('acme.default');