1. Go to this page and download the library: Download nocs/laravel-retriever 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/ */
nocs / laravel-retriever example snippets
namespace Nocs\Retriever\Tests\Cache;
class Colors {
public function red()
{
return 'red';
}
}
$value = retriever()->get('colors.red');
namespace Nocs\Retriever\Tests\Cache;
class Colors {
public function get()
{
return 'red';
}
}
$value = retriever()->get('colors');
namespace Vendor\Package\Providers;
use Illuminate\Support\ServiceProvider;
use Nocs\Retriever\Support\Facades\Retriever;
class PackageServiceProvider extends ServiceProvider
{
public function boot(Router $router)
{
Retriever::loadRetrieversFrom(__dir__.'/../Cache', 'package');
}
}